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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user