@@ -3,7 +3,7 @@ name: Release
33on :
44 push :
55 tags :
6- - ' v*.*.*'
6+ - v*.*.*
77
88permissions :
99 contents : write
@@ -13,57 +13,56 @@ jobs:
1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - name : Checkout
17- uses : actions/checkout@v6
16+ - name : Checkout
17+ uses : actions/checkout@v6
1818
19- - name : Setup Node.js
20- uses : actions/setup-node@v6
21- with :
22- node-version : ' lts/*'
23- cache : ' npm'
19+ - name : Setup Node.js
20+ uses : actions/setup-node@v6
21+ with :
22+ node-version : lts/*
23+ cache : npm
2424
25- - name : Install dependencies
26- run : npm ci
25+ - name : Install dependencies
26+ run : npm ci
2727
28- - name : Run tests
29- uses : coactions/setup-xvfb@v1
30- with :
31- run : npm test
28+ - name : Run tests
29+ uses : coactions/setup-xvfb@v1
30+ with :
31+ run : npm test
3232
33- - name : Package extension
34- run : |
35- npx @vscode/vsce package
33+ - name : Package extension
34+ run : |
35+ npx @vscode/vsce package
3636
37- - name : Get version from tag
38- id : get_version
39- run : |
40- VERSION=${GITHUB_REF#refs/tags/v}
41- echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
42- echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
37+ - name : Get version from tag
38+ id : get_version
39+ run : |
40+ VERSION=${GITHUB_REF#refs/tags/v}
41+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
42+ echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
4343
44- - name : Extract changelog for version
45- id : changelog
46- run : |
47- VERSION=${GITHUB_REF#refs/tags/v}
48- # Extract changelog section for this version
49- sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
50- if [ ! -s release_notes.md ]; then
51- echo "No changelog found for version $VERSION"
52- echo "# Release $VERSION" > release_notes.md
53- echo "See CHANGELOG.md for details." >> release_notes.md
54- fi
44+ - name : Extract changelog for version
45+ id : changelog
46+ run : |
47+ VERSION=${GITHUB_REF#refs/tags/v}
48+ # Extract changelog section for this version
49+ sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
50+ if [ ! -s release_notes.md ]; then
51+ echo "No changelog found for version $VERSION"
52+ echo "# Release $VERSION" > release_notes.md
53+ echo "See CHANGELOG.md for details." >> release_notes.md
54+ fi
5555
56- - name : Create GitHub Release
57- uses : ncipollo/release-action@v1
58- with :
59- artifacts : ' *.vsix'
60- bodyFile : ' release_notes.md'
61- draft : false
62- prerelease : false
63- name : ' Release ${{ steps.get_version.outputs.TAG }}'
64- tag : ${{ steps.get_version.outputs.TAG }}
65- token : ${{ secrets.GITHUB_TOKEN }}
66-
67- - name : Publish to VS Code Marketplace
68- run : npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_PAT }}
56+ - name : Create GitHub Release
57+ uses : ncipollo/release-action@v1
58+ with :
59+ artifacts : " *.vsix"
60+ bodyFile : release_notes.md
61+ draft : false
62+ prerelease : false
63+ name : " Release ${{ steps.get_version.outputs.TAG }}"
64+ tag : ${{ steps.get_version.outputs.TAG }}
65+ token : ${{ secrets.GITHUB_TOKEN }}
6966
67+ - name : Publish to VS Code Marketplace
68+ run : npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_PAT }}
0 commit comments