Skip to content

Commit 7b9a784

Browse files
joborduopen-swe[bot]claude
authored
fix(ci): make OIDC publishing actually work — drop setup-node registry-url, use publishConfig (#363)
The publish kept 404ing because setup-node's registry-url writes an .npmrc with always-auth=true + a placeholder _authToken, so npm used (dummy) TOKEN auth and never attempted OIDC. Remove registry-url/scope from the publish job's setup-node and pin the registry + public access via package.json publishConfig instead — npm now has no token in .npmrc and authenticates via OIDC trusted publishing. Co-authored-by: open-swe[bot] <jonathan@jonathanborduas.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 799d913 commit 7b9a784

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@ jobs:
119119
id-token: write # required for OIDC trusted publishing
120120
steps:
121121
- uses: actions/checkout@v4
122+
# NB: intentionally NO registry-url/scope here. setup-node's registry-url writes an
123+
# .npmrc with `always-auth=true` + a placeholder `_authToken`, which forces npm down
124+
# the (dummy) TOKEN path and it never attempts OIDC → E404. The registry + public
125+
# access come from package.json `publishConfig` instead, leaving OIDC to authenticate.
122126
- uses: actions/setup-node@v4
123127
with:
124128
node-version: '22' # setup-node resolves to the latest 22.x, always >= 22.14.0 (the OIDC trusted-publishing minimum)
125-
registry-url: 'https://registry.npmjs.org'
126-
scope: '@nforma.ai'
127129
- name: Update npm (>= 11.5.1 for trusted publishing)
128130
# ^11.5.1 = latest 11.x AND guaranteed >= 11.5.1 (the trusted-publishing
129131
# minimum), with no unattended jump to a new npm major.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
],
4848
"author": "nForma AI",
4949
"license": "MIT",
50+
"publishConfig": {
51+
"access": "public",
52+
"registry": "https://registry.npmjs.org/"
53+
},
5054
"repository": {
5155
"type": "git",
5256
"url": "git+https://github.com/nForma-AI/nForma.git"

0 commit comments

Comments
 (0)