From bb9f541850ce7a9d0a886076bba82d59a5dd1a3a Mon Sep 17 00:00:00 2001 From: Nicolas CHAIX Date: Wed, 5 Aug 2026 18:18:42 +0200 Subject: [PATCH] Fix release workflow syntax error from unescaped changelog interpolation Interpolating the multi-line changelog (with backticks/quotes) directly into the github-script JS source string broke on release 2.31.0. Pass it via env instead and reference it through process.env in the script. --- .github/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbc6a05..bbdabe2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -163,15 +163,21 @@ jobs: - name: Create Release uses: actions/github-script@v9 + env: + RELEASE_VERSION: ${{ env.flutter_version }} + RELEASE_BODY: ${{ env.change_log }} with: github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} # Use custom token to trigger following workflows script: | + const version = process.env.RELEASE_VERSION; + const body = `${process.env.RELEASE_BODY}\n\nMore info: https://developers.didomi.io/cmp/mobile-sdk`; + github.rest.repos.createRelease({ owner: context.repo.owner, repo: context.repo.repo, - name: "${{ env.flutter_version }}", - tag_name: "${{ env.flutter_version }}", + name: version, + tag_name: version, draft: false, prerelease: false, - body: "${{ env.change_log }}\n\nMore info: https://developers.didomi.io/cmp/mobile-sdk" + body: body });