-
-
Notifications
You must be signed in to change notification settings - Fork 10
69 lines (64 loc) · 1.78 KB
/
main.yml
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
63
64
65
66
67
68
69
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [ opened, synchronize ]
jobs:
verify:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x ]
steps:
- uses: actions/checkout@v2
- name: Setup firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: latest-devedition
- run: firefox --version
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Setup Node Modules
uses: bahmutov/npm-install@v1
env:
CHROMEDRIVER_FILEPATH: "/usr/bin/chromedriver"
- run: xvfb-run npm run verify
env:
CI: true
- uses: actions/upload-artifact@v2
if: matrix.node-version == '14.x'
with:
name: artifacts
path: |
lib
.nyc_output
reports
release:
needs: [ verify ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Setup Node Modules
uses: bahmutov/npm-install@v1
env:
CHROMEDRIVER_FILEPATH: "/usr/bin/chromedriver"
- uses: actions/download-artifact@v2
with:
name: artifacts
- run: npm run publish:reports
env:
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}}
- run: npx semantic-release
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{secrets.GH_TOKEN}}