File tree Expand file tree Collapse file tree 1 file changed +11
-26
lines changed Expand file tree Collapse file tree 1 file changed +11
-26
lines changed Original file line number Diff line number Diff line change 1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
1
+ name : " publish package to npm"
3
2
4
- name : Node.js Package
5
-
6
- on :
3
+ on :
7
4
release :
8
5
types : [created]
9
6
10
7
jobs :
11
- build :
12
- runs-on : ubuntu-latest
13
- steps :
14
- - uses : actions/checkout@v3
15
- - uses : actions/setup-node@v3
16
- with :
17
- node-version : 16
18
- - run : npm ci
19
- - run : npm test
20
-
21
- publish-gpr :
22
- needs : build
8
+ publish :
23
9
runs-on : ubuntu-latest
24
- permissions :
25
- contents : read
26
- packages : write
27
10
steps :
28
- - uses : actions/checkout@v3
29
- - uses : actions/setup-node@v3
11
+ - name : checkout
12
+ uses : actions/checkout@v2
13
+ - name : node
14
+ uses : actions/setup-node@v2
30
15
with :
31
16
node-version : 16
32
- registry-url : https://npm.pkg.github.com/
33
- - run : npm ci
34
- - run : npm publish
17
+ registry-url : https://registry.npmjs.org
18
+ - name : publish
19
+ run : yarn && yarn publish --access public
35
20
env :
36
- NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
21
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments