-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.17 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
name: Continuous Integration
on: [push, pull_request, release]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
ubuntu-20.04,
ubuntu-18.04,
macos-11,
macos-10.15,
windows-2022,
windows-2019,
windows-2016
]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script buildLint
- run: npm run-script buildTypeScript
- run: npm run-script buildNyc
release:
if: github.event_name == 'release' && github.event.action == 'created'
needs: test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script buildTypeScript
- run: echo ${{ secrets.NPMRC }} > ${NPM_CONFIG_USERCONFIG}
- run: "sed -i \"s/\\\"version\\\": \\\"0.0.0\\\",/\\\"version\\\": \\\"${GITHUB_REF/refs\\/tags\\/v/}\\\",/g\" package.json"
- run: npm publish