Skip to content

Verify release tag matches crate version - #116

Merged
kitsuyui merged 2 commits into
mainfrom
fix/audit-cargo-version-tag-mismatch-001
Jun 11, 2026
Merged

Verify release tag matches crate version#116
kitsuyui merged 2 commits into
mainfrom
fix/audit-cargo-version-tag-mismatch-001

Conversation

@kitsuyui

Copy link
Copy Markdown
Owner

Summary:

  • Add a release guard that compares the release tag with Cargo.toml package.version before publishing.
  • Exercise the guard in the pull request publish dry-run workflow with a shell test.
  • Keep the publish step from running when a release tag and crate version disagree.

Tests:

  • git diff --check
  • sh -n scripts/*.sh
  • go run mvdan.cc/sh/v3/cmd/shfmt@v3.13.1 -d scripts/*.sh
  • shellcheck scripts/*.sh
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 -color
  • scripts/test-check-cargo-version-tag.sh
  • scripts/check-cargo-version-tag.sh v0.1.2
  • typos
  • cargo fmt --all -- --check
  • cargo check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-targets --all-features
  • cargo build --release --all-features

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

Code Metrics Report

main (9af049c) #116 (476d7fa) +/-
Coverage 68.3% 68.3% 0.0%
Code to Test Ratio 1:0.1 1:0.1 0.0
Test Execution Time 44s 4s -40s
Details
  |                     | main (9af049c) | #116 (476d7fa) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          68.3% |          68.3% | 0.0% |
  |   Files             |              4 |              4 |    0 |
  |   Lines             |            550 |            550 |    0 |
  |   Covered           |            376 |            376 |    0 |
  | Code to Test Ratio  |          1:0.1 |          1:0.1 |  0.0 |
  |   Code              |            593 |            593 |    0 |
  |   Test              |             71 |             71 |    0 |
+ | Test Execution Time |            44s |             4s | -40s |

Reported by octocov

@kitsuyui
kitsuyui merged commit 0c91c43 into main Jun 11, 2026
5 checks passed
@kitsuyui
kitsuyui deleted the fix/audit-cargo-version-tag-mismatch-001 branch June 11, 2026 12:12
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.

1 participant