Skip to content

Commit 00f0c8c

Browse files
committed
fix: use --notes-file to avoid shell interpolation of backticks in release notes
1 parent a5573d3 commit 00f0c8c

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
@@ -27,18 +27,12 @@ jobs:
2727
contents: write
2828
steps:
2929
- uses: actions/checkout@v4
30-
- name: Extract changelog for ${{ github.ref_name }}
31-
id: changelog
32-
run: |
33-
VERSION="${GITHUB_REF_NAME}"
34-
NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
35-
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
36-
echo "$NOTES" >> "$GITHUB_OUTPUT"
37-
echo "EOF" >> "$GITHUB_OUTPUT"
3830
- name: Create GitHub Release
3931
env:
4032
GH_TOKEN: ${{ github.token }}
4133
run: |
34+
awk "/^## \[${GITHUB_REF_NAME}\]/{found=1; next} found && /^## \[/{exit} found{print}" \
35+
CHANGELOG.md > /tmp/release-notes.md
4236
gh release create "$GITHUB_REF_NAME" \
4337
--title "$GITHUB_REF_NAME" \
44-
--notes "${{ steps.changelog.outputs.notes }}"
38+
--notes-file /tmp/release-notes.md

0 commit comments

Comments
 (0)