From 241aa387bd50addae82d1043fa4d968b3ecb4104 Mon Sep 17 00:00:00 2001 From: Mark Gee Date: Mon, 20 Jul 2026 12:04:36 +0100 Subject: [PATCH] ci: build from the release tag, not branch HEAD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hatch-vcs derives the version from git describe; on a manual re-run main can be ahead of the tag, producing a rejected dev/local version (0.16.2.dev1+g…). Check out refs/tags/ before building so the exact release version is used. --- .github/workflows/release-publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 7ac71de..f597a08 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -56,6 +56,10 @@ jobs: git tag -a "${TAG}" -m "${TAG}" git push origin "${TAG}" fi + # Build from the tag so hatch-vcs produces the exact release version. + # (On a manual re-run, main may have advanced past the tag, which would + # otherwise yield a rejected dev/local version like 0.16.2.dev1+g….) + git checkout -q "refs/tags/${TAG}" - name: Set up conda (conda-build + anaconda-client) uses: conda-incubator/setup-miniconda@v3