Skip to content

Commit c89fc78

Browse files
committed
add release ci
1 parent bbe9b47 commit c89fc78

3 files changed

Lines changed: 1101 additions & 457 deletions

File tree

.github/workflows/release.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Publish Extension
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build Extension
10+
runs-on: ubuntu-latest
11+
container: node:25-alpine
12+
13+
steps:
14+
- name: Install git and dependencies
15+
run: apk add --no-cache git openssh-client
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v6
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Install vsce
24+
run: npm install -g @vscode/vsce
25+
26+
- name: Package extension
27+
run: vsce package --no-dependencies
28+
29+
- name: Upload artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: extension-package
33+
path: *.vsix
34+
35+
publish-vscode:
36+
name: Publish to VS Code Marketplace
37+
runs-on: ubuntu-latest
38+
container: node:25-alpine
39+
needs: build
40+
41+
steps:
42+
- name: Install git and dependencies
43+
run: apk add --no-cache git openssh-client
44+
45+
- name: Checkout code
46+
uses: actions/checkout@v6
47+
48+
- name: Download artifact
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: extension-package
52+
53+
- name: Publish to VS Code Marketplace
54+
run: npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_PUBLISH_TOKEN }}
55+
56+
publish-openvsx:
57+
name: Publish to Open VSX
58+
runs-on: ubuntu-latest
59+
container: node:20-alpine
60+
needs: build
61+
62+
steps:
63+
- name: Install git and dependencies
64+
run: apk add --no-cache git openssh-client
65+
66+
- name: Checkout code
67+
uses: actions/checkout@v6
68+
69+
- name: Download artifact
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: extension-package
73+
74+
- name: Publish to Open VSX
75+
run: npx ovsx publish *.vsix -p ${{ secrets.OVSX_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)