From cab7f843c53d4f07c698349dcd7432fe3700e6a6 Mon Sep 17 00:00:00 2001 From: "Luiz F. Nunes da Silva" Date: Wed, 4 Nov 2026 10:23:46 -0300 Subject: [PATCH] Release: check that the tag matches the version in setup.cfg Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ae2fafe..c3d4765 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,13 @@ jobs: steps: - uses: actions/checkout@v7 + - name: Check that the tag matches the version in setup.cfg + run: | + version=$(sed -n 's/^version = //p' setup.cfg) + if [ "$version" != "$GITHUB_REF_NAME" ]; then + echo "::error::tag $GITHUB_REF_NAME, but setup.cfg declares $version" + exit 1 + fi - name: Build package and attest build provenance uses: hynek/build-and-inspect-python-package@v3 with: