Fix CI: pass changelog notes via env var instead of inline interpolation
All checks were successful
Release / build-and-release (push) Successful in 26m43s

The ${{ steps.changelog.outputs.notes }} expression was being interpolated
directly into shell commands, causing parse errors when the changelog
contained special characters, markdown, or backticks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-03-01 11:06:10 -05:00
parent 1b49871ea0
commit 457dbce6c2

View file

@ -83,6 +83,8 @@ jobs:
} >> "$GITHUB_OUTPUT"
- name: Generate latest.json
env:
CHANGELOG_NOTES: ${{ steps.changelog.outputs.notes }}
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${GITHUB_REF_NAME#v}"
@ -123,7 +125,7 @@ jobs:
jq -n \
--arg version "$VERSION" \
--arg notes "${{ steps.changelog.outputs.notes }}" \
--arg notes "$CHANGELOG_NOTES" \
--arg pub_date "$PUB_DATE" \
--argjson platforms "$PLATFORMS" \
'{version: $version, notes: $notes, pub_date: $pub_date, platforms: $platforms}' \
@ -135,22 +137,20 @@ jobs:
- name: Create release and upload assets
env:
FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG_NOTES: ${{ steps.changelog.outputs.notes }}
run: |
TAG="${GITHUB_REF_NAME}"
API_URL="${GITHUB_SERVER_URL}/api/v1"
REPO="${GITHUB_REPOSITORY}"
BODY=$(cat <<'BODY_EOF'
${{ steps.changelog.outputs.notes }}
BODY="${CHANGELOG_NOTES}
---
## Installation
**Windows** : Téléchargez le fichier `.exe` ci-dessous.
**Linux** : Téléchargez le fichier `.deb` ou `.AppImage` ci-dessous.
BODY_EOF
)
**Windows** : Téléchargez le fichier \`.exe\` ci-dessous.
**Linux** : Téléchargez le fichier \`.deb\` ou \`.AppImage\` ci-dessous."
# Create release
RELEASE_RESPONSE=$(curl -s -X POST \