-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (62 loc) · 1.46 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: ci
on:
push:
branches:
- master
- ci-test
pull_request:
branches:
- master
release:
types:
- created
jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: Print context
run: |
echo "github.ref: ${{ github.ref }}"
echo "github.event_name : ${{ github.event_name }}"
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node: [10, 12, 14]
exclude:
- os: windows-latest
node: 10
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Test on Linux
if: runner.os == 'Linux'
run: xvfb-run -a npm test
- name: Test on macOS, Windows
if: runner.os != 'Linux'
run: npm test
publish:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: npm install
- name: Publish
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}