From ee230fe4fb0f5c310afe7aee1cd8fb04a4e4014f Mon Sep 17 00:00:00 2001 From: MattJackson <1085847+MattJackson@users.noreply.github.com> Date: Mon, 6 Apr 2026 12:13:36 -0700 Subject: [PATCH] Release: verify Cargo.toml version matches git tag --- .github/workflows/release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1eb05e..d817606 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,21 @@ permissions: contents: write jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Verify Cargo.toml version matches tag + run: | + CARGO_VER="v$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')" + if [ "$CARGO_VER" != "${{ github.ref_name }}" ]; then + echo "::error::Cargo.toml says $CARGO_VER but tag is ${{ github.ref_name }}" + exit 1 + fi + echo "Version match: $CARGO_VER" + test: + needs: verify runs-on: ubuntu-latest steps: - uses: actions/checkout@v4