File tree Expand file tree Collapse file tree 2 files changed +34
-13
lines changed Expand file tree Collapse file tree 2 files changed +34
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to NPM
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+
7
+ jobs :
8
+ test :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - uses : actions/setup-node@v2
13
+ with :
14
+ node-version : 16
15
+ - run : yarn && yarn test
16
+
17
+ publish :
18
+ needs : test
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ - uses : actions/setup-node@v2
23
+ with :
24
+ node-version : 16
25
+ - run : yarn && yarn build
26
+ - run : npm publish --tag next
27
+ env :
28
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change 1
- name : Tests
1
+ name : Run tests
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [master]
6
6
pull_request :
7
- branches : [ master ]
8
-
9
- # Allows you to run this workflow manually from the Actions tab
10
- workflow_dispatch :
7
+ branches : [master]
11
8
12
9
jobs :
13
- build :
10
+ test :
14
11
runs-on : ubuntu-latest
15
-
16
12
steps :
17
13
- uses : actions/checkout@v2
18
14
- uses : actions/setup-node@v2
19
15
with :
20
- node-version : ' 14'
21
- - name : Install dependencies
22
- run : yarn
23
- - name : Run tests
24
- run : yarn test
16
+ node-version : 16
17
+ - run : yarn && yarn test
You can’t perform that action at this time.
0 commit comments