Repository navigation
chore: release 0.3.2 and fix npm publishing - #95
Merged
Merged
Conversation
Every npm-publish run failed at npm publish with E404, npm's answer to an unauthenticated scoped publish: the NPM_TOKEN secret was never set. npm has since revoked classic tokens and is restricting 2FA-bypass granular tokens, so authenticate with trusted publishing instead: give the job id-token: write and npm 11.5.1+ (Node 22 ships npm 10), and drop the token. Skip the publish when the version is already on npm, so a re-run, or a release published by hand (the first one has to be: npm only accepts a trusted publisher for a package that already exists), passes.
Alex-Wengg
force-pushed
the
ci/npm-trusted-publishing
branch
from
October 27, 2026 22:22
34065e9 to
d9d599b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #92.
Why npm publishing never worked
All seven
npm-publishruns (v0.2.1 through v0.3.1) built and smoke-tested the package, then failed atnpm publishwithE404. That's what npm returns for an unauthenticated publish to a scope. TheNPM_TOKENsecret was never set; the repo has no secrets at all.npm has also changed since #13. Classic tokens were revoked in December 2025, and 2FA-bypass granular tokens are being restricted, losing direct publish in January 2027. So this moves to trusted publishing, where the workflow authenticates with GitHub's OIDC token and no token or secret exists.
Change
npm-publish.yml:id-token: write, plusnpm install -g npm@latest, because trusted publishing needs npm 11.5.1 or newer and Node 22 ships npm 10. The token is gone.Cargo.tomlandCargo.lock.wasm-packtakes the npm version fromCargo.toml, which still said 0.3.0, so thev0.3.1run would have published0.3.0. This release also includes feat(tn/en): opt-in roman-numeral list markers (roman_enumerators) #91, fix(itn): sentence-mode accuracy fixes for en, fr and de #93 and perf(fst): borrow the grammar in apply instead of cloning it #90.Release steps
npm only accepts a trusted publisher for a package that already exists, so 0.3.2 is published once by hand, built from this branch. After that the trusted publisher is added (
npm trust github … --file npm-publish.yml), and thev0.3.2tag run skips the publish because the version already exists. Later tags publish through trusted publishing.🤖 Generated with Claude Code