1 Commits

Author SHA1 Message Date
52c8614a3c fix: escape release body via Python to avoid YAML parsing errors
All checks were successful
Lint & Test / test (push) Successful in 31s
Build Release / create-release (push) Successful in 1s
Build Release / build-linux (push) Successful in 1m14s
Build Release / build-docker (push) Successful in 7s
Build Release / build-windows (push) Successful in 2m41s
2026-03-22 13:59:14 +03:00

View File

@@ -30,36 +30,38 @@ jobs:
REPO=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
DOCKER_IMAGE="${SERVER_HOST}/${REPO}"
# Build release body
BODY=$(cat <<BODY_EOF
## Downloads
# Build release body via Python to avoid YAML escaping issues
BODY_JSON=$(python3 -c "
import json, sys
tag = '$TAG'
image = '$DOCKER_IMAGE'
body = f'''## 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\` |
| 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}
docker pull {image}:{tag}
docker run -d --name ledgrab -p 8080:8080 -v ledgrab-data:/app/data {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"]'\`
1. Change the default API key in config/default_config.yaml
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()))")
3. See INSTALLATION.md for detailed configuration
'''
import textwrap
print(json.dumps(textwrap.dedent(body).strip()))
")
RELEASE=$(curl -s -X POST "$BASE_URL/releases" \
-H "Authorization: token $GITEA_TOKEN" \