-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.18 KB
/
continuous-integration.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
name: Continuous Integration
on:
push:
pull_request:
release:
types:
[published]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script lint
- run: npm run-script buildTypeScript
- run: sudo apt-get install xvfb
if: matrix.os == 'ubuntu-18.04'
- run: xvfb-run npm run-script buildNyc
if: matrix.os == 'ubuntu-18.04'
- run: npm run-script buildNyc
if: matrix.os != 'ubuntu-18.04'
release:
if: github.event_name == 'release'
needs: test
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: sed -i s/"999.999.999"/"${GITHUB_REF##*/}"/ package.json package-lock.json
- run: npm ci
- run: npm run-script buildTypeScript
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}