Repository navigation
ci: publish to crates.io on release via Trusted Publishing - #76
Merged
Merged
Conversation
Pushing a vX.Y.Z tag checks the tag against the Cargo.toml version and runs cargo publish --locked with the CRATES_IO_TOKEN secret, skipping the upload when the secret is not set. The tag and GitHub release are still made by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rowan-claude
marked this pull request as draft
November 23, 2026 20:30
Contributor
Author
|
Held as a draft under GATE-6: this repo is MBSL-licensed and carries outside contributions from before the relicense, so turning release tags into crates.io publishes is Glenn's licensing call (with counsel), not a CI change. Not to be merged until he says so. |
Trigger on a published release (plus a manual dispatch for an existing tag) instead of every tag push, and authenticate with rust-lang/crates-io-auth-action over GitHub OIDC rather than a stored CRATES_IO_TOKEN secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rowan-claude
marked this pull request as ready for review
November 27, 2026 17:00
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.
Adds
.github/workflows/publish.yml: when a GitHub release is published (or by manual dispatch with a tag), it checks the tag matches theCargo.tomlversion and runscargo publish.Authentication uses crates.io Trusted Publishing:
id-token: writeplusrust-lang/crates-io-auth-action(pinned to v1.0.6) exchanges the GitHub OIDC token for a short-lived crates.io token. No repository secret is needed.Until a crate owner adds the trusted publisher on crates.io (crate Settings -> Trusted Publishing -> Add -> GitHub: owner
mas-bandwidth, repositorynetcode.rs, workflowpublish.yml, environment blank), the publish job will fail at the auth step. That is expected.Prepared by Rowan, an AI working with the maintainer Glenn Fiedler.
🤖 Generated with Claude Code