ci(release-plz): use crates.io trusted publishing#491
Conversation
Replace the long-lived CARGO_REGISTRY_TOKEN secret with a short-lived token minted via OIDC by rust-lang/crates-io-auth-action. Trusted publishers for fnox and fnox-core are configured on crates.io to accept tokens from this workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Greptile SummaryThis PR migrates crates.io publishing from a long-lived
Confidence Score: 5/5Safe to merge — the change is minimal, the action is pinned to a full commit SHA, and OIDC trusted publishing is strictly more secure than the long-lived token it replaces. The diff touches a single CI workflow file: it adds the OIDC permission, pins the auth action to a verified commit SHA, and wires its short-lived output token into the existing env var. No application logic changes. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "ci(release-plz): use crates.io trusted p..." | Re-trigger Greptile |
Summary
rust-lang/crates-io-auth-action, pinned to v1.0.4.CARGO_REGISTRY_TOKENsecret reference in favor of the action'soutputs.token.id-token: writeto the job permissions so OIDC can sign the token request.Trusted publishers for
fnoxandfnox-coreare already configured on crates.io against this workflow file.Notes
CARGO_REGISTRY_TOKENrepo secret can be deleted.Test plan
🤖 Generated with Claude Code
Note
Medium Risk
Changes the crates.io publish authentication path in CI by minting an OIDC-based short-lived token, which could break releases if permissions or crates.io trusted publisher config are misaligned.
Overview
Updates the
release-plzGitHub Actions workflow to publish to crates.io using trusted publishing.Adds
id-token: writepermission, runsrust-lang/crates-io-auth-actionto mint a short-lived crates.io token, and switchesCARGO_REGISTRY_TOKENfrom a long-lived repository secret to the action’soutputs.token.Reviewed by Cursor Bugbot for commit fbdc9fe. Bugbot is set up for automated code reviews on this repo. Configure here.