File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change 1- name : Publish package to GitHub Packages
1+ name : Publish package to npm (trusted publisher)
22on :
33 push :
44 branches :
55 - main
6+ permissions :
7+ contents : read
8+ id-token : write # required for npm trusted publisher (OIDC)
69jobs :
710 build :
8- runs-on : ubuntu-latest
9- permissions :
10- contents : read
11- packages : write
11+ runs-on : ubuntu-latest
12+
1213 steps :
13- - uses : actions/checkout@v3
14- # Setup .npmrc file to publish to GitHub Packages
15- - uses : actions/setup-node@v3
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-node@v4
1616 with :
17- node-version : ' 18.x'
18- registry-url : ' https://registry.npmjs.org'
17+ node-version : " 18.x"
18+ registry-url : " https://registry.npmjs.org"
1919 - run : npm ci
2020 - run : npm run build
21- - run : npm publish --access public
22- env :
23- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
21+ # OIDC auth + provenance; no token needed when using trusted publishers
22+ - run : npm publish --provenance --access public
You can’t perform that action at this time.
0 commit comments