Update release.yml

This commit is contained in:
rustmailer
2025-12-29 12:25:05 +08:00
parent b07defa2d5
commit 558ea2f9b0
+16
View File
@@ -34,6 +34,22 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Verify Cargo.toml version matches git tag
shell: bash
run: |
TAG_VERSION="${GITHUB_REF_NAME}"
CARGO_VERSION=$(grep '^version\s*=' Cargo.toml | head -n1 | sed -E 's/version\s*=\s*"([^"]+)"/\1/')
echo "Git tag version: $TAG_VERSION"
echo "Cargo.toml version: $CARGO_VERSION"
if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
echo "::error::Version mismatch! Git tag ($TAG_VERSION) does not match Cargo.toml version ($CARGO_VERSION)"
exit 1
fi
- name: Install Rust
uses: actions-rs/toolchain@v1
with: