ci: verify release tag against the facade crate version - #35
Merged
Conversation
The publish workflow read `.packages[0].version` from cargo metadata and asserted it equalled the pushed tag. Because release-plz versions each crate independently, an unchanged crate (geometry-tag, geometry-derive) can lag the release, and `.packages[0]` may resolve to one of those laggards — failing the check even though the release is correct (v0.0.8 failed with "does not match workspace version v0.0.7"). Verify the tag against the facade crate `boost_geometry` specifically, which is what the release tag tracks. The downstream publish loop already tolerates per-crate versions (it skips crates already on crates.io), so no other change is needed.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Problem
The
v0.0.8publish run failed:The "Verify tag matches workspace version" step read
.packages[0].versionfrom
cargo metadataand asserted it equalled the pushed tag. Sincerelease-plz versions each crate independently, unchanged crates
(
geometry-tag,geometry-derive) correctly stay on their previous version(
0.0.7) while the rest move to0.0.8..packages[0]can resolve to one ofthose laggards, so the check failed even though the release is correct.
Fix
Verify the tag against the facade crate
boost_geometryspecifically —the crate the release tag actually tracks — instead of an arbitrary
.packages[0]. Empty-result guard added.The downstream publish loop already tolerates per-crate versions (it skips
crates already on crates.io), so no other change is needed. Per-crate
versioning is intended behaviour, not a bug — unchanged crates keep their
published version.
Verification
0.0.8on the release commit → matchesv0.0.8→ step passes..packages[0]filter returned0.0.7→ the observed failure.publish.ymlre-parsed as valid YAML.Note
This fixes the check going forward. To re-publish v0.0.8, the
v0.0.8tag must be re-pointed at a commit that includes this fix (the tag currently
points at
730a5c7, which predates it) — a maintainer action, not done here.