chore: use trusted publishing for cargo releases#816
Conversation
📝 WalkthroughWalkthroughThe release workflow is reconfigured to use crates.io trusted publishing instead of token-based authentication. The ChangesTrusted Publishing Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR migrates cargo publishing from a long-lived
Confidence Score: 5/5Safe to merge — the change is minimal, well-scoped, and follows the release-plz trusted publishing guide precisely. A two-line workflow change: one permission added, one secret env var removed. release-plz's own documentation describes this exact pattern as the correct way to enable crates.io OIDC trusted publishing, and the permission is narrowly scoped to the single job that needs it. The only prerequisite (configuring the trusted publisher on crates.io for each existing crate) is an out-of-band operational step that has no bearing on the correctness of the workflow itself. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "chore: use trusted publishing for cargo ..." | Re-trigger Greptile |
Summary
id-token: writeto the release-plz publish jobCARGO_REGISTRY_TOKENfrom cargo publishingValidation
actionlint .github/workflows/release-plz.ymlNote: the crates.io trusted publisher must be configured for each existing workspace crate to trust
endevco/aubeand.github/workflows/release-plz.yml. New crates still need their first publish done manually before trusted publishing can take over.This PR was generated by Codex.
Note
Medium Risk
Publishing now depends on per-crate crates.io trusted-publisher configuration; misconfiguration would block releases until fixed, though the change is limited to CI credentials.
Overview
The release-plz release job on
mainnow publishes workspace crates to crates.io via OIDC trusted publishing instead of a long-lived registry secret.It adds
id-token: writeon that job so GitHub Actions can mint the token crates.io expects, dropsCARGO_REGISTRY_TOKENfrom therelease-plzstep env, and updates the workflow comment to describe trusted publishing. GitHub release tagging andAUBE_GH_TOKENusage are unchanged.Each crate still needs a one-time crates.io trusted-publisher setup for this repo and workflow before publishes succeed without the old secret.
Reviewed by Cursor Bugbot for commit aeaa6a7. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit