Skip to content

fix(ci): publish 0.10.x via npm trusted publishing - #3293

Merged
interactivellama merged 1 commit into
0.10.xfrom
fix/0.10.x-npm-publish-oidc
Nov 10, 2026
Merged

interactivellama merged 1 commit into
0.10.xfrom
fix/0.10.x-npm-publish-oidc

Conversation

@interactivellama

Copy link
Copy Markdown
Contributor

Additional description

The v0.10.66 publish run built the package, then failed at npm publish:

npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@salesforce%2fdesign-system-react

Root cause: npm returns a 404 on a scoped PUT when the publish has no valid auth.

  • A release runs the workflow from its own tag, so v0.10.66 used the 0.10.x workflow: Node 14 / npm 6, authenticating only with secrets.NPM_TOKEN. That secret was last set on 2026-01-09, when 0.10.65 was published, and has since expired.
  • Master hasn't hit this because it publishes through npm trusted publishing (OIDC). Its alpha releases have signed provenance. OIDC needs id-token: write and npm >= 11.5.1, which npm 6 can't provide.
  • The latest dist-tag isn't involved. The registry rejects the request before it applies a tag.

Fix:

  • Grant id-token: write.
  • Keep the Node 14 install and build.
  • Switch to Node 24.19.0 (the same as master) just before the publish step.
  • Drop the stale token, so an auth problem fails clearly instead of falling back to it.

npm's trusted publisher entry matches the repo and the npm-publish.yml filename, which 0.10.x shares with master.

After merge: re-running the failed run would use the old workflow from the tag. Instead, delete and recreate the v0.10.66 release and its tag targeting 0.10.x. That also fixes the release title, which currently reads "v0.10.65".

Verification

  • The publish log shows "Signed provenance statement" and + @salesforce/[email protected].
  • npm view @salesforce/design-system-react dist-tags shows latest: 0.10.66, with alpha unchanged.

The v0.10.66 release failed at `npm publish` with E404 on the PUT,
which is npm's response to a publish without valid auth. This workflow
only sends the NPM_TOKEN secret, last set 2026-01-09 and now expired.
Master publishes through npm trusted publishing (OIDC), which needs
`id-token: write` and npm >= 11.5.1; npm 6 on Node 14 can't use it.

Grant `id-token: write` and switch to Node 24 for the publish step only,
keeping the Node 14 build, and drop the stale token.
@interactivellama
interactivellama merged commit 8d775f9 into 0.10.x Nov 10, 2026
6 checks passed
@interactivellama
interactivellama deleted the fix/0.10.x-npm-publish-oidc branch November 10, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant