1616 - name : Setup Node.js
1717 uses : actions/setup-node@v5
1818 with :
19- node-version : ' 20.x '
19+ node-version : ' lts/* '
2020 cache : ' npm'
2121
2222 - name : Install dependencies
@@ -33,22 +33,38 @@ jobs:
3333
3434 - name : Get version from tag
3535 id : get_version
36- run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
36+ run : |
37+ VERSION=${GITHUB_REF#refs/tags/v}
38+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
39+ echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
40+
41+ - name : Extract changelog for version
42+ id : changelog
43+ run : |
44+ VERSION=${GITHUB_REF#refs/tags/v}
45+ # Extract changelog section for this version
46+ sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
47+ if [ ! -s release_notes.md ]; then
48+ echo "No changelog found for version $VERSION"
49+ echo "# Release $VERSION" > release_notes.md
50+ echo "See CHANGELOG.md for details." >> release_notes.md
51+ fi
3752
3853 - name : Create GitHub Release
39- uses : softprops/action-gh- release@v2
54+ uses : ncipollo/ release-action@v1
4055 with :
41- files : ' *.vsix'
42- generate_release_notes : true
56+ artifacts : ' *.vsix'
57+ bodyFile : ' release_notes.md '
4358 draft : false
4459 prerelease : false
45- env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ name : ' Release ${{ steps.get_version.outputs.TAG }}'
61+ tag : ${{ steps.get_version.outputs.TAG }}
62+ token : ${{ secrets.GITHUB_TOKEN }}
4763
4864 # Publishing to marketplaces requires secrets to be configured
4965 # VSCE_PAT and OVSX_PAT need to be added as repository secrets
5066 # Uncomment and configure these steps when ready to publish
51-
67+
5268 # - name: Publish to VS Code Marketplace
5369 # run: npx @vscode/vsce publish --pat ${{ secrets.VSCE_PAT }}
5470 # if: secrets.VSCE_PAT != null
0 commit comments