Skip to content

Commit 7cd1d71

Browse files
committed
Add CI workflow.
1 parent f3f21d1 commit 7cd1d71

File tree

4 files changed

+55
-3
lines changed

4 files changed

+55
-3
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
tags:
6+
- v*
7+
pull_request:
8+
name: CI
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out source code
14+
uses: actions/checkout@v4
15+
- name: Set up Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: v20.x
19+
- name: Install dependencies
20+
run: npm install
21+
- name: List files to be packaged
22+
run: npm exec vsce ls
23+
- name: Package extension
24+
run: npm exec vsce package
25+
- name: Upload package artifact
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: package
29+
path: '*.vsix'
30+
publish:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
34+
steps:
35+
- name: Set up Node
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: v20.x
39+
- name: Install VSCE
40+
run: npm install -g @vscode/vsce
41+
- name: Download package artifact
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: package
45+
- name: Publish package
46+
run: vsce publish -i *.vsix
47+
env:
48+
VSCE_PAT: ${{ secrets.VSCE_PAT }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
out
22
dist
3+
package-lock.json
34
node_modules
45
.vscode-test-web/
56
*.vsix

.vscodeignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.vscode/**
2-
node_modules/**
31
.gitignore
2+
.github/**
3+
node_modules/**
4+
.vscode/**
45
examples/**

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
]
4242
},
4343
"scripts": {},
44-
"devDependencies": {}
44+
"devDependencies": {
45+
"@vscode/vsce": "^3.2.2"
46+
}
4547
}

0 commit comments

Comments
 (0)