CI/release: verify isolated publish on manifest changes, and publish workspace in one step - #28
Merged
Merged
Conversation
The workspace test build passes even when a crate is missing a per-crate feature, because Cargo unifies features across the workspace. cargo publish verifies each crate compiled on its own, so it catches those gaps — this is how the 11.4.0 release broke (impl needed syn's "printing" feature). Add a job running cargo publish --workspace --dry-run, gated on Cargo.toml changes via dorny/paths-filter so it only runs when a manifest actually changed.
cargo publish --workspace publishes all members in dependency order, verifying every crate before uploading any, and waits for the index internally. This removes the manual publish-per-crate + sleep 20s hack and prevents partial releases: if one crate fails verification, none are uploaded (the 11.4.0 failure uploaded utils then broke on impl).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #28 +/- ##
=======================================
Coverage 75.97% 75.97%
=======================================
Files 9 9
Lines 566 566
=======================================
Hits 430 430
Misses 136 136 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Two publishing-robustness changes prompted by the 11.4.0 partial release (utils uploaded, then impl failed verification).
release.yml — publish the whole workspace at once
Replaces the publish-one-by-one +
sleep 20ssteps with a singlecargo publish --workspace. It publishes members in dependency order, verifies every crate before uploading any, and waits for the index internally. If one crate fails verification, nothing uploads — so a broken crate can't leave a partial release behind, which is exactly what broke 11.4.0.test.yml — catch isolation breaks on PRs
Adds a
publish-dry-runjob runningcargo publish --workspace --dry-run --all-features, which compiles each packaged crate on its own and catches missing per-crate features that workspace feature unification hides (the missing synprintingfeature that broke the release). Gated on Cargo.toml changes viadorny/paths-filter, so it only runs when a manifest changed.This PR touches no Cargo.toml, so the new dry-run step is skipped here — expected; it exercises on the next release/dependency PR. Verified
cargo publish --workspace --dry-run --all-featurespasses locally on master.