Repository navigation
ci(release): publish to npm with trusted publishing - #232
Merged
Merged
Conversation
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>
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.
Removes the long-lived
NPM_TOKENfrom 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_TOKENsecret could no longer publish. With trusted publishing there is no token to expire or rotate.Changes
publish-npmandpublish-npm-wasm:NODE_AUTH_TOKENis gone from the publish and dry-run steps. Nothing else had to change: both jobs already run GitHub-hosted withid-token: writeon Node 26 (npm 11.20), which is what trusted publishing needs.NPM_CONFIG_PROVENANCEstays on the publish steps.Needed on npm, outside this PR
Each of the nine packages needs a trusted publisher: GitHub Actions,
firecrawl/anydoc, workflowrelease.yml, withnpm publishallowed. The packages are@firecrawl/anydoc,@firecrawl/anydoc-wasmand the seven platform packages thatnapi prepublishpublishes:-darwin-x64,-darwin-arm64,-linux-x64-gnu,-linux-x64-musl,-linux-arm64-gnu,-linux-arm64-musland-win32-x64-msvc.After merging
The
NPM_TOKENrepository secret can be deleted.Verification
The workflow parses, and a manual dispatch of this branch runs the whole pipeline in dry-run mode.
Summary by cubic
Removes the long-lived
NPM_TOKENfrom 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 theNPM_TOKENsecret could no longer publish; trusted publishing removes the need to expire or rotate a token.Drops
NODE_AUTH_TOKENfrom the publish and dry-run steps inpublish-npmandpublish-npm-wasm. Nothing else needed to change because both jobs already run GitHub-hosted withid-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
@firecrawl/anydoc,@firecrawl/anydoc-wasm, and the seven platform packagesnapi prepublishpublishes (-darwin-x64,-darwin-arm64,-linux-x64-gnu,-linux-x64-musl,-linux-arm64-gnu,-linux-arm64-musl,-win32-x64-msvc) — for GitHub Actions,firecrawl/anydoc, workflowrelease.yml, withnpm publishallowed.NPM_TOKENrepository secret.Written for commit ae0bb05. Summary will update on new commits.