Skip to content

chore: harden release workflow#41

Merged
DCjanus merged 4 commits into
masterfrom
chore/check-release-tag-version
May 8, 2026
Merged

chore: harden release workflow#41
DCjanus merged 4 commits into
masterfrom
chore/check-release-tag-version

Conversation

@DCjanus
Copy link
Copy Markdown
Owner

@DCjanus DCjanus commented May 8, 2026

Why

  • Prevent release tags from publishing the wrong crate version.
  • Keep the release workflow and release-note style easy to follow for future maintenance.

What

  • Add a release workflow check that requires vX.Y.Z tags to match Cargo.toml package.version.
  • Use the stable Rust toolchain action before running release checks and cargo publish.
  • Document the release process, GitHub release-note command, and release-related agent guidance.

Validation

  • GITHUB_REF_NAME=v0.19.0 version check passes locally.
  • GITHUB_REF_NAME=v9.9.9 version check fails locally as expected.
  • prek run --all-files

DCjanus added 3 commits May 9, 2026 00:32
Assisted-by: Codex:gpt-5.5
Assisted-by: Codex:gpt-5.5
Assisted-by: Codex:gpt-5.5
@DCjanus DCjanus requested a review from Copilot May 8, 2026 16:48
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.00%. Comparing base (5a61e79) to head (c8fe79e).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) matches Cargo.toml package version before authenticating to crates.io and publishing.
  • Add docs/release.md describing tagging, publishing, and GitHub release notes creation.
  • Add AGENTS.md guidance 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 thread docs/release.md
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')"
@DCjanus DCjanus changed the title chore: check release tag version chore: harden release workflow May 8, 2026
@DCjanus DCjanus merged commit 0940e28 into master May 8, 2026
8 checks passed
@DCjanus DCjanus deleted the chore/check-release-tag-version branch May 8, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants