From ea7d09a26735b6a9470d3912108edee5463b4272 Mon Sep 17 00:00:00 2001 From: Dmitry Prudnikov Date: Thu, 9 Apr 2026 16:30:22 +0300 Subject: [PATCH] fix(release): pin build version via SETUPTOOLS_SCM_PRETEND_VERSION hatch-vcs detects dirty working tree (submodule state) and appends local version identifier, producing 0.4.1.dev0+g.d instead of the clean tag version. Force the correct version from the tag name. --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f26d9ef..b5e6a3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,10 @@ jobs: - name: Build wheel + sdist working-directory: ${{ matrix.package.path }} - run: uv run python -m build + run: | + # Force hatch-vcs / setuptools_scm to use the tag version, not dirty-tree dev version + export SETUPTOOLS_SCM_PRETEND_VERSION="${GITHUB_REF_NAME#v}" + uv run python -m build - name: Upload dist artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4