Skip to content

Commit 60b71d8

Browse files
committed
feat(ci): enable npm trusted publishing with provenance
Add NPM_CONFIG_PROVENANCE=true to enable OIDC-based authentication for npm publishing. This uses GitHub's OIDC tokens instead of long-lived NPM_TOKEN secrets, providing better security. Requires npm Trusted Publisher to be configured at: https://www.npmjs.com/settings/PACKAGE/publishing
1 parent 0c01865 commit 60b71d8

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@taskade/temporal-parser": patch
3+
---
4+
5+
Enable npm provenance for trusted publishing. Adds NPM_CONFIG_PROVENANCE flag to use OIDC authentication instead of long-lived tokens.

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Node.js
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '22.x'
27+
node-version: '24.x'
2828
cache: 'npm'
2929

3030
- name: Install dependencies
@@ -40,7 +40,7 @@ jobs:
4040
- name: Setup Node.js for npm
4141
uses: actions/setup-node@v4
4242
with:
43-
node-version: '22.x'
43+
node-version: '24.x'
4444
registry-url: 'https://registry.npmjs.org'
4545

4646
- name: Create Release Pull Request or Publish to npm
@@ -52,14 +52,14 @@ jobs:
5252
commit: 'chore: version packages'
5353
env:
5454
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
NPM_CONFIG_PROVENANCE: true
5656

5757
# Only publish to GitHub Packages if npm publish succeeded
5858
- name: Setup Node.js for GitHub Packages
5959
if: steps.changesets.outputs.published == 'true'
6060
uses: actions/setup-node@v4
6161
with:
62-
node-version: '22.x'
62+
node-version: '24.x'
6363
registry-url: 'https://npm.pkg.github.com'
6464
scope: '@taskade'
6565

0 commit comments

Comments
 (0)