File tree 1 file changed +48
-0
lines changed
1 file changed +48
-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
+ steps :
17
+ - name : ' Checkout repository'
18
+ uses : actions/checkout@v2
19
+ - name : ' Setup Node ${{ matrix.node }}'
20
+ uses : actions/setup-node@v2
21
+ with :
22
+ node-version : ' ${{ matrix.node }}'
23
+ - name : ' Install depependencies'
24
+ run : npm install
25
+ - name : ' Test'
26
+ run : npm run test
27
+ release :
28
+ name : ' Release'
29
+ runs-on : ubuntu-latest
30
+ needs : build
31
+ if : github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next')
32
+ steps :
33
+ - name : ' Checkout repository'
34
+ uses : actions/checkout@v2
35
+ - name : ' Setup Node'
36
+ uses : actions/setup-node@v2
37
+ with :
38
+ node-version : 16
39
+ - name : ' Install depependencies'
40
+ run : npm install
41
+ - name : ' Build'
42
+ run : npm run build
43
+ - name : ' Release'
44
+ run : |
45
+ npx semantic-release
46
+ env :
47
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments