Skip to content

fix(release): upgrade npm so OIDC trusted publishing works#138

Merged
markovejnovic merged 1 commit into
mainfrom
fix/npm-oidc-upgrade
Jun 10, 2026
Merged

fix(release): upgrade npm so OIDC trusted publishing works#138
markovejnovic merged 1 commit into
mainfrom
fix/npm-oidc-upgrade

Conversation

@markovejnovic

Copy link
Copy Markdown
Contributor

Problem

The Publish to npm job in the v0.0.6 release failed:

npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/@harmont%2fhm

Provenance signing succeeded, but the publish itself went out unauthenticated. @harmont/hm uses OIDC trusted publishing, but node 20 ships npm 10, which can sign provenance yet cannot authenticate a publish via OIDC — that requires npm ≥ 11.5.1. With no credentials, npm masks the auth failure on a scoped package as a 404.

Fix

Add npm install -g npm@latest after setup-node so the configured trusted publisher actually authenticates. No token/secret needed.

Fixes npm publishing for v0.0.7+. (v0.0.6's npm artifact needs a one-off manual publish since re-runs use the workflow as it was at the tag.)

node 20 ships npm 10, which signs provenance but can't authenticate a publish
via OIDC trusted publishing (needs npm >= 11.5.1). The unauthenticated PUT was
masked as a 404. Add 'npm install -g npm@latest' to the npm job.
@markovejnovic markovejnovic merged commit baa1338 into main Jun 10, 2026
17 of 18 checks passed
@markovejnovic markovejnovic deleted the fix/npm-oidc-upgrade branch June 10, 2026 23:59
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