From 7cf11866395cdd3a9c520b4b62a4e34a52b5fe09 Mon Sep 17 00:00:00 2001 From: Ilona Shishov Date: Mon, 5 Feb 2024 11:45:19 +0200 Subject: [PATCH] chore: invoke multiline syntax for GITHUB_OUTPUT in staging workflow Signed-off-by: Ilona Shishov --- .github/workflows/stage.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index c4696e422..1e5c4ba0f 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -86,7 +86,13 @@ jobs: echo "Release notes are missing for version $version." exit 1 else - echo "notes=$notes" >> "$GITHUB_OUTPUT" + echo "version=$version" >> "$GITHUB_OUTPUT" + + escaped_notes=$(echo "$notes" | sed 's/[][&(){}\\/*+?^|.$`'"'"'=!%;<>,:;-\"]/\\&/g') + delimiter="$(openssl rand -hex 8)" + echo "notes<<${delimiter}" >> "$GITHUB_OUTPUT" + echo "$escaped_notes" >> "$GITHUB_OUTPUT" + echo "${delimiter}" >> "$GITHUB_OUTPUT" fi - name: Update current version date in changelog @@ -146,7 +152,7 @@ jobs: const response = await github.request('POST /repos/' + repo_name + '/releases', { tag_name: '${{ steps.bump.outputs.version }}', name: '${{ steps.bump.outputs.version }}', - body: ${{ steps.release-notes.outputs.notes }}, + body: '${{ steps.release-notes.outputs.notes }}', prerelease: false, generate_release_notes: true })