chore: harden release workflow#41
Merged
Merged
Conversation
Assisted-by: Codex:gpt-5.5
Assisted-by: Codex:gpt-5.5
Assisted-by: Codex:gpt-5.5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41 +/- ##
=======================================
Coverage 76.00% 76.00%
=======================================
Files 2 2
Lines 50 50
=======================================
Hits 38 38
Misses 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a safeguard and documentation around the crate release flow so publishing only occurs when the pushed vX.Y.Z tag matches the crate version in Cargo.toml, and so future release maintenance work has a clear reference.
Changes:
- Add a GitHub Actions step to validate
GITHUB_REF_NAME(tag) matchesCargo.tomlpackage version before authenticating to crates.io and publishing. - Add
docs/release.mddescribing tagging, publishing, and GitHub release notes creation. - Add
AGENTS.mdguidance to consult the release process doc for release-related work.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/release.md | Documents the intended release/tagging workflow and GitHub release notes process. |
| AGENTS.md | Points release-related tasks to the release process documentation. |
| .github/workflows/release.yml | Enforces tag/version matching prior to crates.io auth and cargo publish. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+7
to
+9
| - Work from the latest `master`. | ||
| - Confirm `Cargo.toml` has the version being released. | ||
| - Confirm the latest `master` CI run is green. |
| - name: Check release tag matches crate version | ||
| run: | | ||
| tag_version="${GITHUB_REF_NAME#v}" | ||
| crate_version="$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')" |
Assisted-by: Codex:gpt-5.5
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.
Why
What
vX.Y.Ztags to matchCargo.tomlpackage.version.cargo publish.Validation
GITHUB_REF_NAME=v0.19.0version check passes locally.GITHUB_REF_NAME=v9.9.9version check fails locally as expected.prek run --all-files