Skip to content

Commit b215a75

Browse files
authored
Merge pull request #22 from alienfast/ci/oidc-publish
ci: publish to npmjs.org via OIDC trusted publishing
2 parents 0f84b11 + abaf8c1 commit b215a75

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010
issues: write
1111
pull-requests: write
1212
packages: write
13+
id-token: write # npm trusted publishing (OIDC) to npmjs.org
1314

1415
jobs:
1516
release:
@@ -41,8 +42,12 @@ jobs:
4142

4243
- run: yarn release
4344

45+
# OIDC trusted publishing requires npm >= 11.5.1; setup-node's bundled npm may lag behind
46+
- run: npm install --global npm@latest
47+
4448
# cannot run this on branches because it doesn't keep the canary version from auto shipit, can only secondarily publish to npm for main branch
4549
- name: Publish secondarily to npm
50+
# Auth for npmjs.org is OIDC trusted publishing (id-token above), not NPM_TOKEN; npm auto-generates provenance.
4651
# waiting on bug/related pr/auto release https://github.com/intuit/auto/issues/2488
4752
# run: lerna exec --stream --parallel -- npm publish --access=public --ignore-scripts --@alienfast:registry='https://registry.npmjs.org'
4853
run: >

0 commit comments

Comments
 (0)