Add a Cargo.toml & Git tag version comparison

I released the first couple versions without updating the value in
Cargo.toml. This will check for that happening again and abort the
build.
This commit is contained in:
2025-07-06 12:54:52 -05:00
parent a23bdf3e34
commit 8eacb510a2

View File

@@ -8,6 +8,11 @@ jobs:
name: Compile and upload a release build
steps:
- uses: actions/checkout@v4
- name: Get Cargo version
run: echo "cargo_version=v$(grep "^version" Cargo.toml | cut -d \" -f2)" >> $GITHUB_ENV
- name: Abort if Cargo.toml & Git Tag versions don't match
if: ${{ env.cargo_version != github.ref_name }}
run: exit 1
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Build binary crate