From cf878ac5737af897fb43a4c1819abd1add67dc14 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 5 Jan 2025 21:08:23 +0900 Subject: [PATCH] Escape specials characters in release notes --- .github/workflows/dist.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 191fd1c8fad..b8800c8854b 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -135,6 +135,8 @@ jobs: \"tag_name\": \"${{ github.ref_name }}\", \"previous_tag_name\": \"$latest_release_tag\" }" | jq -r '.body') + # escape special characters for json + release_notes=$(jq -R -s '.' <<< "$release_notes") curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ @@ -144,7 +146,7 @@ jobs: -d "{ \"tag_name\": \"${{ github.ref_name }}\", \"prerelease\": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}, - \"body\": \"$release_notes\" + \"body\": $release_notes }" - name: Create release assets uses: softprops/action-gh-release@v2