Skip to content

Commit e69f0d6

Browse files
ewelsclaude
andcommitted
fix: verify Cargo.lock version matches Cargo.toml in release check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c868466 commit e69f0d6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ jobs:
4949
echo "::error::Tag $VERSION already exists"
5050
exit 1
5151
fi
52+
53+
LOCK_VERSION=$(awk '/^name = "rustqc"/{found=1} found && /^version =/{print; exit}' Cargo.lock | sed 's/.*"\(.*\)"/\1/')
54+
if [ "$LOCK_VERSION" != "$RAW" ]; then
55+
echo "::error::Cargo.lock version ($LOCK_VERSION) does not match Cargo.toml version ($RAW)"
56+
exit 1
57+
fi
58+
5259
echo "Detected release: $VERSION"
5360
else
5461
echo "is_release=false" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)