Skip to content

Commit f9bc479

Browse files
naveenskyclaude
andauthored
Fix Publishing Issues (#51)
* Use npm OIDC trusted publishing instead of NPM_TOKEN - Upgrade to Node 22 and npm@latest (11.5.1+ required for OIDC) - Remove --provenance flag (automatic with OIDC) - Remove NPM_TOKEN dependency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add production environment to publish workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a5c1bca commit f9bc479

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish to NPM
33
on:
44
push:
55
branches:
6-
- main
6+
- npm-publish
77

88
permissions:
99
id-token: write # Required for npm provenance (OIDC)
@@ -12,6 +12,7 @@ permissions:
1212
jobs:
1313
publish:
1414
runs-on: ubuntu-latest
15+
environment: production
1516

1617
steps:
1718
- name: Checkout code
@@ -20,9 +21,12 @@ jobs:
2021
- name: Setup Node.js
2122
uses: actions/setup-node@v4
2223
with:
23-
node-version: '20'
24+
node-version: '22'
2425
registry-url: 'https://registry.npmjs.org'
2526

27+
- name: Update npm for OIDC support
28+
run: npm install -g npm@latest
29+
2630
- name: Install dependencies
2731
run: npm install
2832

@@ -49,4 +53,4 @@ jobs:
4953
5054
- name: Publish to NPM
5155
if: steps.version-check.outputs.should_publish == 'true'
52-
run: npm publish --access=public --provenance
56+
run: npm publish --access=public

0 commit comments

Comments
 (0)