File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ name: Node.js Package
55
66on :
77 release :
8- types : [created ]
8+ types : [published ]
99
1010jobs :
1111 build :
2828 node-version : 16
2929 registry-url : https://registry.npmjs.org/
3030 - run : npm ci
31- - run : npm publish
31+ - run : npm publish --tag ${{ github.event.release.tag_name }}
32+ env :
33+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
34+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
35+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
36+
37+ name : Node.js Package
38+
39+ on :
40+ release :
41+ types : [published]
42+
43+ jobs :
44+ build :
45+ runs-on : ubuntu-latest
46+ steps :
47+ - uses : actions/checkout@v3
48+ - uses : actions/setup-node@v3
49+ with :
50+ node-version : 16
51+ - run : npm ci
52+ - run : npm test
53+
54+ publish-npm :
55+ needs : build
56+ runs-on : ubuntu-latest
57+ steps :
58+ - uses : actions/checkout@v3
59+ - uses : actions/setup-node@v3
60+ with :
61+ node-version : 16
62+ registry-url : https://registry.npmjs.org/
63+ - run : npm ci
64+ - run : npm publish --tag ${{ github.event.release.tag_name }}
3265 env :
3366 NODE_AUTH_TOKEN : ${{secrets.npm_token}}
You can’t perform that action at this time.
0 commit comments