Skip to content

Commit

Permalink
Escape specials characters in release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Jan 5, 2025
1 parent 1be0a58 commit cf878ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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
Expand Down

0 comments on commit cf878ac

Please sign in to comment.