Repository navigation
fix(release): publish the v1 line through npm trusted publishing - #1158
Conversation
Every publish from this branch now fails with E404 on the PUT: the release workflow still uses the NPM_TOKEN secret, while the trusted publishers registered by scripts/setup-trusted-publishing.ts are bound to the workflow file release-tagged.yml and main publishes through OIDC. Rename the workflow to release-tagged.yml and give it what main's has: id-token: write and a current npm. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Summary
Follow-up to #1157. With the dist-tag fixed, every publish on
v1now gets past validation and fails withE404 Not Found - PUT https://registry.npmjs.org/@solid-primitives%2f<name>, which is how npm reports a publish with missing or invalid credentials. Nothing fromv1is on npm yet (timer@1.5.1anddate@2.1.13, the fix for #1151, are still unpublished).Cause (evidence, not yet confirmed on npm's side)
v1workflow (release.yml) authenticates with theNPM_TOKENsecret. That secret was last updated 2026-06-04, and npm is restricting classic tokens that bypass 2FA for direct publishing.mainpublishes through npm trusted publishing (OIDC) and just releasedtimer@2.0.0this way.scripts/setup-trusted-publishing.tsregisters the trusted publishers against the workflow filerelease-tagged.yml, andmain's workflow hasid-token: writeand a current npm.v1has neither the permission, nor the right file name.npm trust listneeds a login), so this is the most consistent explanation, not a verified one.Change
Rename
.github/workflows/release.ymltorelease-tagged.ymland add whatmain's workflow has:permissionsincludingid-token: write, and thenpm install -g npm@lateststep (trusted publishing needs npm >= 11.5.1). The action versions stay asv1had them, since its install and build steps work, and the publish step still runspnpm run release(nowchangeset publish --tag solid-1).What merging does
The
Releaseworkflow runs on every push tov1, so merging this triggers another publish attempt of the 53 waiting versions (list in #1157), under thesolid-1dist-tag. Two things to expect:v1(for exampleautofocus,immutable,page-visibility,stream) are probably not registered as trusted publishers, because the setup script iterates the packages onmain. They will keep failing with the same 404 until a maintainer registers them:pnpm setup:trusted-publishing --file release-tagged.yml --only autofocus,immutable,page-visibility,stream(needsnpm login). Packages that did publish stay published; Changesets continues with the next package.NPM_TOKENsecret with publish rights, then re-running the failed workflow. npm is deprecating the old bypass-2FA tokens, so OIDC is the better long-term fix.After it works
npm view @solid-primitives/timer@1.5.1 peerDependenciesshould show onlysolid-js ^1.6.12.timer@1.4.5,timer@1.5.0,date@3.0.0anddate@3.0.1(see Potential unintentional breaking change in @solid-primitives/timer 1.4.5 #1151).🤖 Generated with Claude Code