Repository navigation
ci: authenticate npm publish with NPM_TOKEN on Mac minis - #56
Merged
Merged
Conversation
npm trusted publishing does not support self-hosted runners, so the publish job (already on [self-hosted, macOS, ARM64]) authenticates with the org NPM_TOKEN secret via NODE_AUTH_TOKEN instead of OIDC. That drops automatic provenance. Keep the version/tag gate, skip-if-published check, and prepublishOnly tests, and fail closed if the token is missing. Co-authored-by: Joe Blau <[email protected]>
joeblau
marked this pull request as ready for review
October 18, 2026 17:46
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.
This drops npm trusted publishing and automatic provenance, per Joe’s decision. Official npm docs say trusted publishing supports GitHub-hosted runners only; self-hosted runners are not supported (Trusted publishing for npm packages). Same change as bloxwap/font#14.
Summary
Every CI job was already on
runs-on: [self-hosted, macOS, ARM64](runner group JWS). Nothing was left onubuntu-latest. The remaining problem was the Publish to npm job, which still used OIDC trusted publishing (id-token: write, no token). That cannot work on these minis.publishauthenticates withNODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}(org-level granular token, publish rights for@bloxwappackages).id-token: writeis removed from that job.actions/setup-nodesetsregistry-url: https://registry.npmjs.org.check-publish-auth.tsruns on every release, including when the version is already published. It checks the token (whoami + collaborator write access) and never prints it. The unit test asserts fail-closed without a token.>=11.5.1,prepublishOnlytests, and the publicpublishConfigare unchanged. No check was skipped.docs/ci-runners.md, README, Releasing) record that publish usesNPM_TOKENwithout provenance. Codecov and GitHub Pages still use OIDC.actions/setup-pythonis unused here (and cannot install on the minis).Checks
npm testandnpm run coveragepassnpm run sizestays within budget (no package size change)npm run docs:dev) (N/A — no sound changes)