File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change 11name : Publish VS Code Extension
22
33on :
4+ release :
5+ types : [published]
6+
47 workflow_dispatch :
58
69permissions :
710 contents : read
811
912jobs :
1013 build :
14+ name : Build & Package VSIX
1115 runs-on : ubuntu-latest
16+
1217 steps :
1318 - name : Checkout repository
1419 uses : actions/checkout@v4
1722 uses : actions/setup-node@v4
1823 with :
1924 node-version : 18
25+ cache : npm
2026
2127 - name : Install dependencies
22- run : npm install
28+ run : npm ci
2329
2430 - name : Compile TypeScript
2531 run : npm run compile
@@ -37,26 +43,35 @@ jobs:
3743 path : " *.vsix"
3844
3945 release :
46+ name : Attach VSIX to GitHub Release
4047 needs : build
4148 runs-on : ubuntu-latest
49+
4250 permissions :
4351 contents : write
52+
4453 steps :
45- - name : Download artifact
54+ - name : Download VSIX artifact
4655 uses : actions/download-artifact@v4
4756 with :
4857 name : extension
58+ path : dist
4959
50- - name : Create GitHub Release
51- uses : softprops/action-gh-release@v1
60+ - name : Create / update GitHub Release with VSIX
61+ uses : softprops/action-gh-release@v2
5262 with :
53- files : " *.vsix"
63+ files : dist/ *.vsix
5464 env :
5565 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5666
5767 publish :
68+ name : Publish to VS Code Marketplace
5869 needs : release
5970 runs-on : ubuntu-latest
71+
72+ permissions :
73+ contents : read
74+
6075 steps :
6176 - name : Checkout repository
6277 uses : actions/checkout@v4
7388 uses : actions/download-artifact@v4
7489 with :
7590 name : extension
91+ path : dist
7692
7793 - name : Publish to VSCode Marketplace
78- run : vsce publish --packagePath *.vsix
94+ run : vsce publish --packagePath dist/ *.vsix
7995 env :
8096 VSCE_PAT : ${{ secrets.VSCE_PAT }}
You can’t perform that action at this time.
0 commit comments