File tree Expand file tree Collapse file tree 1 file changed +25
-10
lines changed
Expand file tree Collapse file tree 1 file changed +25
-10
lines changed Original file line number Diff line number Diff line change 1- # This workflow will publish a package to npm when a release is published
2- # For more information, see https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
1+ # This workflow will run tests using node and then publish a package to npm when a release is created
2+ # For more information see:
3+ # https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
4+ # https://docs.npmjs.com/trusted-publishers
5+
6+ name : Node.js Package
37
4- name : Publish Package to npmjs
58on :
69 release :
710 types : [published]
11+
12+ permissions :
13+ id-token : write
14+ contents : read
15+
816jobs :
917 build :
1018 runs-on : ubuntu-latest
1119 steps :
1220 - uses : actions/checkout@v4
13- # setup .npmrc file to publish to npm
14- - uses : actions/setup-node@v3
21+ - uses : actions/setup-node@v4
22+ with :
23+ node-version : 24
24+ - run : npm ci
25+ - run : npm test
26+
27+ publish-npm :
28+ needs : build
29+ runs-on : ubuntu-latest
30+ steps :
31+ - uses : actions/checkout@v4
32+ - uses : actions/setup-node@v4
1533 with :
16- node-version : ' 18.x '
17- registry-url : ' https://registry.npmjs.org'
34+ node-version : 24
35+ registry-url : https://registry.npmjs.org/
1836 - run : npm ci
19- - run : npm run build:lib
2037 # scoped packages are private by default so need to add public flag
2138 - run : npm publish --access public
22- env :
23- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments