Skip to content

ci: publish npm packages only through trusted publishing - #766

Draft
Kinfe123 wants to merge 1 commit into
mainfrom
ci/npm-trusted-publishing-only
Draft

Kinfe123 wants to merge 1 commit into
mainfrom
ci/npm-trusted-publishing-only

Conversation

@Kinfe123

Copy link
Copy Markdown
Collaborator

Why

Releases still publish to npm with the long-lived NPM_TOKEN secret (set 2026-09-10). The publish job already has id-token: write, and its bootstrap step falls back to trusted publishing only when the secret is unset. RELEASING.md planned to finish this migration after the first releases, but it never happened.

Change

  • release.yml: remove the "Configure bootstrap npm token when present" step. npm publish (npm 11.20.0 with Node 26.13.0) then authenticates through the job's OIDC token.
  • package/test/release-workflow.test.js: the publish job must keep id-token: write, and no NPM_TOKEN, NODE_AUTH_TOKEN or _authToken may appear anywhere in the release workflow. Checked locally: it fails against current main and passes here.
  • RELEASING.md: trusted publishing is described as the only path, plus how a brand-new platform package gets its first publish.

Before merging (draft until done)

On npmjs.com, add a trusted publisher to each of the 9 packages (riftri plus the 8 riftri-<platform> packages): package Settings, Trusted Publisher, GitHub Actions, with organization assistant-ui, repository riftri, workflow release.yml, and no environment.

Merging before that would make the next release's publish step fail authentication. The publish script is restartable, so it would recover once the publishers are added, but it is better avoided.

After merging

  1. Delete the NPM_TOKEN repository secret.
  2. On npmjs.com, revoke the token itself.
  3. Optionally set each package's publishing access to require 2FA and disallow tokens.
  4. The next release is the first trusted publish; its npm provenance should show the release workflow.

Remove the bootstrap step that configured NPM_TOKEN when the secret was set,
guard against any npm token returning to the release workflow, and describe
trusted publishing as the only publishing path in RELEASING.md.
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
riftri Ready Ready Preview Oct 30, 2026 9:34pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 389fc67a Deployed Oct 30, 2026 by vercel[bot]
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