Skip to content

Commit 26f3ac3

Browse files
committed
fix: use --notes-file to avoid shell interpolation of backticks in release notes
1 parent 0bf96f6 commit 26f3ac3

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,12 @@ jobs:
5555
contents: write
5656
steps:
5757
- uses: actions/checkout@v4
58-
- name: Extract changelog for ${{ github.ref_name }}
59-
id: changelog
60-
run: |
61-
VERSION="${GITHUB_REF_NAME}"
62-
NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
63-
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
64-
echo "$NOTES" >> "$GITHUB_OUTPUT"
65-
echo "EOF" >> "$GITHUB_OUTPUT"
6658
- name: Create GitHub Release
6759
env:
6860
GH_TOKEN: ${{ github.token }}
6961
run: |
62+
awk "/^## \[${GITHUB_REF_NAME}\]/{found=1; next} found && /^## \[/{exit} found{print}" \
63+
CHANGELOG.md > /tmp/release-notes.md
7064
gh release create "$GITHUB_REF_NAME" \
7165
--title "$GITHUB_REF_NAME" \
72-
--notes "${{ steps.changelog.outputs.notes }}"
66+
--notes-file /tmp/release-notes.md

0 commit comments

Comments
 (0)