Skip to content

Commit bddaf16

Browse files
committed
fix: use --notes-file to avoid shell interpolation of backticks in release notes
1 parent 531bad3 commit bddaf16

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [main]
6-
tags: ['v*']
6+
tags: ['[0-9]*.[0-9]*.[0-9]*']
77
pull_request:
88
branches: [main]
99

@@ -23,7 +23,7 @@ jobs:
2323
release:
2424
needs: build
2525
runs-on: ubuntu-latest
26-
if: startsWith(github.ref, 'refs/tags/v')
26+
if: startsWith(github.ref, 'refs/tags/')
2727
permissions:
2828
contents: write
2929
steps:
@@ -35,20 +35,14 @@ jobs:
3535
cache: 'maven'
3636
- name: Build fat JAR
3737
run: mvn -B package -DskipTests
38-
- name: Extract changelog for ${{ github.ref_name }}
39-
id: changelog
40-
run: |
41-
VERSION="${GITHUB_REF_NAME#v}"
42-
NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
43-
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
44-
echo "$NOTES" >> "$GITHUB_OUTPUT"
45-
echo "EOF" >> "$GITHUB_OUTPUT"
4638
- name: Create GitHub Release
4739
env:
4840
GH_TOKEN: ${{ github.token }}
4941
run: |
42+
awk "/^## \[${GITHUB_REF_NAME}\]/{found=1; next} found && /^## \[/{exit} found{print}" \
43+
CHANGELOG.md > /tmp/release-notes.md
5044
JAR=$(ls target/mcp-*.jar | grep -v 'original-' | head -1)
5145
gh release create "$GITHUB_REF_NAME" \
5246
--title "$GITHUB_REF_NAME" \
53-
--notes "${{ steps.changelog.outputs.notes }}" \
47+
--notes-file /tmp/release-notes.md \
5448
"$JAR#qtsurfer-mcp-java-${GITHUB_REF_NAME}.jar"

0 commit comments

Comments
 (0)