fix: update release description to match current build artifacts
Some checks failed
Lint & Test / test (push) Failing after 14s

Add Windows installer, Docker volume mount, and first-time setup
instructions to the Gitea release body. Fix Docker registry URL.
Add CI/Release sync rule to CLAUDE.md.
This commit is contained in:
2026-03-22 13:50:46 +03:00
parent 8bed09a401
commit 42bc05c968
2 changed files with 42 additions and 1 deletions

View File

@@ -25,13 +25,49 @@ jobs:
IS_PRE="true" IS_PRE="true"
fi fi
# Build registry path for Docker instructions
SERVER_HOST=$(echo "${{ gitea.server_url }}" | sed -E 's|https?://||')
REPO=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
DOCKER_IMAGE="${SERVER_HOST}/${REPO}"
# Build release body
BODY=$(cat <<BODY_EOF
## Downloads
| Platform | File | Description |
|----------|------|-------------|
| Windows (installer) | \`LedGrab-${TAG}-setup.exe\` | Install with Start Menu shortcut, optional autostart, uninstaller |
| Windows (portable) | \`LedGrab-${TAG}-win-x64.zip\` | Unzip anywhere → run \`LedGrab.bat\` |
| Linux | \`LedGrab-${TAG}-linux-x64.tar.gz\` | Extract → run \`./run.sh\` |
| Docker | See below | \`docker pull\` → \`docker run\` |
After starting, open **http://localhost:8080** in your browser.
### Docker
\`\`\`bash
docker pull ${DOCKER_IMAGE}:${TAG}
docker run -d --name ledgrab -p 8080:8080 -v ledgrab-data:/app/data ${DOCKER_IMAGE}:${TAG}
\`\`\`
### First-time setup
1. Change the default API key in \`config/default_config.yaml\` or set \`WLED_AUTH__API_KEYS='["your-secret-key"]'\`
2. Open http://localhost:8080 and discover your WLED devices
3. See [INSTALLATION.md](INSTALLATION.md) for detailed configuration
BODY_EOF
)
# Escape body for JSON
BODY_JSON=$(echo "$BODY" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))")
RELEASE=$(curl -s -X POST "$BASE_URL/releases" \ RELEASE=$(curl -s -X POST "$BASE_URL/releases" \
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{ -d "{
\"tag_name\": \"$TAG\", \"tag_name\": \"$TAG\",
\"name\": \"LedGrab $TAG\", \"name\": \"LedGrab $TAG\",
\"body\": \"## Downloads\\n\\n| Platform | File | How to run |\\n|----------|------|------------|\\n| Windows | \`LedGrab-${TAG}-win-x64.zip\` | Unzip → run \`LedGrab.bat\` → open http://localhost:8080 |\\n| Linux | \`LedGrab-${TAG}-linux-x64.tar.gz\` | Extract → run \`./run.sh\` → open http://localhost:8080 |\\n| Docker | See below | \`docker pull\` → \`docker run\` |\\n\\n### Docker\\n\\n\`\`\`bash\\ndocker pull ${{ gitea.server_url }}/${{ gitea.repository }}:${TAG}\\ndocker run -d -p 8080:8080 ${{ gitea.server_url }}/${{ gitea.repository }}:${TAG}\\n\`\`\`\", \"body\": $BODY_JSON,
\"draft\": false, \"draft\": false,
\"prerelease\": $IS_PRE \"prerelease\": $IS_PRE
}") }")

View File

@@ -53,6 +53,7 @@ Use `TODO.md` in the project root as the primary task tracker. **Do NOT use the
**NEVER rename a storage file path, store key, entity ID prefix, or JSON field name without writing a migration.** User data lives in JSON files under `data/`. If the code starts reading from a new filename while the old file still has user data, THAT DATA IS SILENTLY LOST. **NEVER rename a storage file path, store key, entity ID prefix, or JSON field name without writing a migration.** User data lives in JSON files under `data/`. If the code starts reading from a new filename while the old file still has user data, THAT DATA IS SILENTLY LOST.
When renaming any storage-related identifier: When renaming any storage-related identifier:
1. **Add migration logic in `BaseJsonStore.__init__`** (or the specific store) that detects the old file/key and migrates data to the new name automatically on startup 1. **Add migration logic in `BaseJsonStore.__init__`** (or the specific store) that detects the old file/key and migrates data to the new name automatically on startup
2. **Log a clear warning** when migration happens so the user knows 2. **Log a clear warning** when migration happens so the user knows
3. **Keep the old file as a backup** after migration (rename to `.migrated` or similar) 3. **Keep the old file as a backup** after migration (rename to `.migrated` or similar)
@@ -63,6 +64,10 @@ This applies to: file paths in `StorageConfig`, JSON root keys (e.g. `picture_ta
**Incident context:** A past rename of `picture_targets.json``output_targets.json` was done without migration. The app created a new empty `output_targets.json` while the user's 7 targets sat unread in the old file. Data was silently lost. **Incident context:** A past rename of `picture_targets.json``output_targets.json` was done without migration. The app created a new empty `output_targets.json` while the user's 7 targets sat unread in the old file. Data was silently lost.
## CI/Release Workflow
When modifying the release workflow (`.gitea/workflows/release.yml`), **always keep the release description body in sync with actual build artifacts**. If you add/remove/rename a build artifact (ZIP, installer, tarball, Docker image), update the release description table in the `create-release` job to match.
## General Guidelines ## General Guidelines
- Always test changes before marking as complete - Always test changes before marking as complete