Skip to content

Commit fa13b9a

Browse files
committed
ci: update
1 parent 79805b3 commit fa13b9a

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,49 @@ on:
22
push:
33
branches:
44
- master
5-
pull_request:
6-
types: [opened, synchronize, reopened]
75

86
jobs:
9-
build:
10-
runs-on: ubuntu-latest
7+
test:
8+
name: Test
9+
strategy:
10+
matrix:
11+
os: [macos-latest, ubuntu-latest, windows-latest]
12+
runs-on: ${{ matrix.os }}
1113
steps:
1214
- name: Checkout
13-
uses: actions/checkout@v3
14-
- name: Install Node.js
15-
uses: actions/setup-node@v3
15+
uses: actions/checkout@v2
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v1
1618
with:
17-
node-version: 16.x
18-
- run: npm install
19-
- name: Compile
20-
run: npm run compile
19+
node-version: 14
20+
- name: Install dependencies
21+
run: npm install
22+
- name: Run headless test
23+
uses: GabrielBB/xvfb-action@v1.0
24+
with:
25+
run: npm test
26+
27+
publish:
28+
name: Release and publish
29+
needs: test
30+
runs-on: ubuntu-18.04
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v1
36+
with:
37+
node-version: 14
38+
- name: Install dependencies
39+
run: npm install
40+
- name: Release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
run: npx semantic-release
45+
- name: Vscode release plugin
46+
uses: JCofman/vscodeaction@master
47+
env:
48+
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
49+
with:
50+
args: publish -p $PUBLISHER_TOKEN

0 commit comments

Comments
 (0)