File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
-
4
- name : Publish
1
+ name : Test and Publish
5
2
on :
6
3
push :
7
4
branches : [ master ]
5
+ tags : [ 'v*' ]
8
6
pull_request :
9
7
branches : [ master ]
10
8
jobs :
15
13
node-version : [16.x, 18.x, 20.x]
16
14
steps :
17
15
- uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
18
- name : Use Node.js ${{ matrix.node-version }}
19
19
uses : actions/setup-node@v3
20
20
with :
23
23
- run : yarn run test
24
24
publish :
25
25
needs : [test]
26
- if : ${{ startsWith(github.ref, 'refs/tags/v') }}
26
+ if : startsWith(github.ref, 'refs/tags/v')
27
27
runs-on : ubuntu-latest
28
28
steps :
29
29
- uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1
- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
-
4
1
name : Test
5
2
on : pull_request
6
3
jobs :
11
8
node-version : [16.x, 18.x, 20.x]
12
9
steps :
13
10
- uses : actions/checkout@v4
11
+ with :
12
+ fetch-depth : 0
14
13
- name : Use Node.js ${{ matrix.node-version }}
15
14
uses : actions/setup-node@v3
16
15
with :
You can’t perform that action at this time.
0 commit comments