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.
This commit is contained in:
parent
e6fd22f8a1
commit
94e481fb6e
1 changed files with 9 additions and 3 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue