Skip to content

Commit c384146

Browse files
committed
ci: add OIDC provenance support for npm publishing
- Add id-token: write permission for OIDC token generation - Add registry-url to setup-node for npm auth - Set NPM_CONFIG_PROVENANCE to publish with provenance via OIDC - Bypasses 2FA/OTP requirement for automated publishing
1 parent 65e67bc commit c384146

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
permissions:
1414
contents: write
1515
pull-requests: write
16+
id-token: write
1617

1718
steps:
1819
- uses: actions/checkout@v4
@@ -24,6 +25,7 @@ jobs:
2425
uses: actions/setup-node@v4
2526
with:
2627
node-version: 22
28+
registry-url: 'https://registry.npmjs.org'
2729
cache: 'pnpm'
2830

2931
- name: Install dependencies
@@ -43,3 +45,4 @@ jobs:
4345
env:
4446
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)