Skip to content

Commit 3ddcd6f

Browse files
committed
feat: add GitHub Actions workflow for publishing the extension to marketplaces
1 parent 4b094a5 commit 3ddcd6f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Extension
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 9
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Publish to VS Code Marketplace
33+
run: npx vsce publish -p ${{ secrets.VSCE_PAT }}
34+
continue-on-error: true # Optional: prevents failure if version is not updated
35+
36+
- name: Publish to Open VSX Registry
37+
run: npx ovsx publish -p ${{ secrets.OVSX_PAT }}
38+
continue-on-error: true # Optional: prevents failure if version is not updated

0 commit comments

Comments
 (0)