File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
3+
4+ name : Publish package to npmjs
5+
6+ on :
7+ push :
8+ tags :
9+ - " v*"
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+ - uses : actions/setup-node@v3
17+ with :
18+ node-version : 22
19+ - run : npm install
20+ - run : npm test
21+ - run : npm run build
22+
23+ publish-gpr :
24+ needs : build
25+ runs-on : ubuntu-latest
26+ permissions :
27+ contents : read
28+ packages : write
29+ steps :
30+ - uses : actions/checkout@v3
31+ - uses : actions/setup-node@v3
32+ with :
33+ node-version : 16
34+ registry-url : https://registry.npmjs.org
35+ - run : npm publish --access public
36+ env :
37+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments