Skip to content

Commit cdb6a6d

Browse files
chore: add github ci
1 parent 3017f0a commit cdb6a6d

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/build-main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
jobs:
7+
build:
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18.x
20+
- run: npm install
21+
- run: xvfb-run -a npm test
22+
if: runner.os == 'Linux'
23+
- run: npm test
24+
if: runner.os != 'Linux'
25+
26+
- name: Publish
27+
run: npm run deploy
28+
env:
29+
VSCE_PAT: ${{ secrets.VSCE_PAT }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
"scripts": {
7474
"lint": "eslint .",
7575
"pretest": "npm run lint",
76-
"test": "vscode-test"
76+
"test": "vscode-test",
77+
"deploy": "vsce publish --npm"
7778
},
7879
"devDependencies": {
7980
"@types/mocha": "^10.0.7",

0 commit comments

Comments
 (0)