Skip to content

ci(release): publish to npm with trusted publishing - #232

Merged
mogery merged 1 commit into
mainfrom
mogery/publish-to-npm-with
Nov 18, 2026
Merged

mogery merged 1 commit into
mainfrom
mogery/publish-to-npm-with

Conversation

@mogery

@mogery mogery commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Removes the long-lived NPM_TOKEN from the release workflow. Both npm jobs now authenticate through npm trusted publishing (OIDC), the way the PyPI job already does.

Why
The v0.2.5 release reached crates.io and PyPI, but both npm jobs failed because the NPM_TOKEN secret could no longer publish. With trusted publishing there is no token to expire or rotate.

Changes

  • publish-npm and publish-npm-wasm: NODE_AUTH_TOKEN is gone from the publish and dry-run steps. Nothing else had to change: both jobs already run GitHub-hosted with id-token: write on Node 26 (npm 11.20), which is what trusted publishing needs.
  • NPM_CONFIG_PROVENANCE stays on the publish steps.
  • The comments now say the workflow filename is registered with npm as well as PyPI, and that both trusted publishing and provenance need a GitHub-hosted runner.

Needed on npm, outside this PR
Each of the nine packages needs a trusted publisher: GitHub Actions, firecrawl/anydoc, workflow release.yml, with npm publish allowed. The packages are @firecrawl/anydoc, @firecrawl/anydoc-wasm and the seven platform packages that napi prepublish publishes: -darwin-x64, -darwin-arm64, -linux-x64-gnu, -linux-x64-musl, -linux-arm64-gnu, -linux-arm64-musl and -win32-x64-msvc.

After merging
The NPM_TOKEN repository secret can be deleted.

Verification
The workflow parses, and a manual dispatch of this branch runs the whole pipeline in dry-run mode.

Open in Capy


Summary by cubic

Removes the long-lived NPM_TOKEN from the release workflow. Both npm jobs now authenticate through npm trusted publishing (OIDC), matching how the PyPI job already publishes. The v0.2.5 release reached crates.io and PyPI but both npm jobs failed because the NPM_TOKEN secret could no longer publish; trusted publishing removes the need to expire or rotate a token.

Drops NODE_AUTH_TOKEN from the publish and dry-run steps in publish-npm and publish-npm-wasm. Nothing else needed to change because both jobs already run GitHub-hosted with id-token: write. Comments now record that the workflow filename is registered with npm as well as PyPI, and that trusted publishing and provenance both require a GitHub-hosted runner.

Migration

  • Register a trusted publisher on npm for each of the nine packages — @firecrawl/anydoc, @firecrawl/anydoc-wasm, and the seven platform packages napi prepublish publishes (-darwin-x64, -darwin-arm64, -linux-x64-gnu, -linux-x64-musl, -linux-arm64-gnu, -linux-arm64-musl, -win32-x64-msvc) — for GitHub Actions, firecrawl/anydoc, workflow release.yml, with npm publish allowed.
  • After merging, delete the NPM_TOKEN repository secret.

Written for commit ae0bb05. Summary will update on new commits.

View guided diff Turn on auto-fix

Drop NODE_AUTH_TOKEN from the npm publish and dry-run steps. Both jobs
already run GitHub-hosted with id-token: write, so npm authenticates
through OIDC once each package has a trusted publisher.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Turn on auto-fix | Re-trigger cubic

@mogery
mogery merged commit 6feb6c2 into main Nov 18, 2026
41 checks passed
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