From 8eacb510a26ff007da5bea3ee7be3126e0477ee3 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sun, 6 Jul 2025 12:54:52 -0500 Subject: [PATCH] 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. --- .gitea/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 404238c..79262b8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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