From 4325f04d50812b84846427e3778726afbb7c5286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Wale=C5=84?= Date: Sun, 18 Oct 2026 20:07:27 +0200 Subject: [PATCH] Bump version to 2.3.3 and verify tag matches version on release The v2.3.2 release was tagged with pyproject.toml still at 2.3.1, so the publish workflow tried to re-upload 2.3.1 and PyPI rejected it. Add a check that fails early when the release tag and project version differ. Fixes #93 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 9 +++++++++ pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1cff507..bbff56e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,15 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.13 + - name: Check version matches tag + if: startsWith(github.ref, 'refs/tags') + run: | + tag_version="${GITHUB_REF_NAME#v}" + project_version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") + if [ "$tag_version" != "$project_version" ]; then + echo "::error::Tag $GITHUB_REF_NAME does not match version $project_version in pyproject.toml" + exit 1 + fi - name: Install build run: | python3 -m pip install build diff --git a/pyproject.toml b/pyproject.toml index da916eb..8c630cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "requests", "six", ] -version = "2.3.1" +version = "2.3.3" [project.urls] "homepage" = "https://github.com/sio2project/filetracker"