Repository navigation
Release bcmalloc to crates.io and GitHub when a version tag is pushed - #12
Merged
Merged
Conversation
A new workflow runs on tags that start with v. It checks that the tag names the version in bcmalloc's manifest and that crates.io does not have that version yet, publishes the crate, and creates a GitHub release for the tag with notes that GitHub generates from the pull requests merged since the last release. Only bcmalloc is published; the other crates in the workspace have publish = false. Publishing needs a crates.io token in the CARGO_REGISTRY_TOKEN secret.
clabby
force-pushed
the
release-workflow
branch
from
November 14, 2026 18:58
ed5405b to
f6b5053
Compare
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.
The workflow.
.github/workflows/release.yamlruns when a tag that starts withvis pushed. It runs three steps in order:vplus the version incrates/bcmalloc/Cargo.toml, and crates.io must not have that version yet. The check asks the crates.io API for the version: a 404 passes, a 200 fails as already published, and any other answer fails rather than guessing.cargo publish -p bcmalloc --locked. Onlybcmallocis published; the other crates in the workspace havepublish = false.gh release create <tag> --verify-tag --generate-notes. The notes are GitHub's changelog of the pull requests merged since the previous release.Before the first tag: add a crates.io token that may publish
bcmallocas theCARGO_REGISTRY_TOKENrepository secret. Nobody holds the name on crates.io yet.Releasing: bump
versionincrates/bcmalloc/Cargo.toml, merge, thengit tag v0.1.0 && git push origin v0.1.0.Checks:
cargo publish -p bcmalloc --dry-run --lockedpackages and verifies the crate, README symlink included.v0.1.0passes, because the crate is not on crates.io.v0.2.0fails on the version mismatch.serde1.0.0 fails as already published.Stacked on #11.