File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on :
3
+ - push
4
+ - pull_request
5
+ jobs :
6
+ build :
7
+ name : ' Test on Node ${{ matrix.node }} and ${{ matrix.os }}'
8
+ runs-on : ' ${{ matrix.os }}'
9
+ strategy :
10
+ # max-parallel: 1
11
+ matrix :
12
+ node :
13
+ - 16
14
+ os :
15
+ - ubuntu-latest
16
+ # - windows-latest
17
+ # - macOS-latest
18
+ steps :
19
+ - name : ' Checkout repository'
20
+ uses : actions/checkout@v2
21
+ - name : ' Setup Node ${{ matrix.node }}'
22
+ uses : actions/setup-node@v2
23
+ with :
24
+ node-version : ' ${{ matrix.node }}'
25
+ - name : ' Install depependencies'
26
+ run : npm install
27
+ - name : ' Test'
28
+ run : |
29
+ npm run test
30
+ release :
31
+ name : ' Release'
32
+ runs-on : ubuntu-latest
33
+ needs : build
34
+ if : github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next')
35
+ steps :
36
+ - name : ' Checkout repository'
37
+ uses : actions/checkout@v2
38
+ - name : ' Setup Node'
39
+ uses : actions/setup-node@v2
40
+ with :
41
+ node-version : 16
42
+ - name : ' Install depependencies'
43
+ run : |
44
+ npm install
45
+ - name : ' Build'
46
+ run : |
47
+ npm run build
48
+ - name : ' Release'
49
+ run : |
50
+ npx semantic-release
51
+ env :
52
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments