From 94e481fb6e122f9d36fd8c9f0e6aa9fac95bd01e Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 17 Aug 2026 15:45:59 +0100 Subject: [PATCH] fix release.yml: GITHUB_TOKEN sanitized + quote multi-line env values - GITHUB_TOKEN expression was sanitized to '*** ... }}' by an upstream templating pass, breaking YAML parse on Forgejo with 'did not find expected alphabetic or numeric character' at line 223. - RELEASE_BODY and IS_PRERELEASE are quoted (YAML double-quoted string) so the parser accepts multi-line release body content sourced from CHANGELOG.md. Verified locally with yaml.safe_load. --- .forgejo/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index f85d5bd..bb7a23a 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -220,12 +220,18 @@ jobs: - name: Publier la release Forgejo via l'API REST env: - GITHUB_TOKEN: *** secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_API_URL: ${{ github.api_url }} GITHUB_REPOSITORY: ${{ github.repository }} TAG: ${{ github.event_name == 'push' && github.ref_name || inputs.tag }} - RELEASE_BODY: ${{ env.RELEASE_BODY }} - IS_PRERELEASE: ${{ env.IS_PRERELEASE }} + # RELEASE_BODY peut contenir des retours à la ligne et + # des caractères YAML-réservés (':', '#', etc.) issus du + # CHANGELOG.md. On le quote en YAML double-quoted string + # pour que le parser Forgejo accepte la valeur multi-ligne. + # Sinon : "yaml: line N: did not find expected alphabetic + # or numeric character". + RELEASE_BODY: "${{ env.RELEASE_BODY }}" + IS_PRERELEASE: "${{ env.IS_PRERELEASE }}" run: | if [[ -z "$TAG" ]]; then echo "::error::No tag resolved for the API call."