From 2c20d656effaf87299c35cec2c6e2b2b93783081 Mon Sep 17 00:00:00 2001 From: Richard Blythman Date: Fri, 20 Dec 2024 14:49:10 +0000 Subject: [PATCH] make release tags consistent --- .github/workflows/python-publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2482e44..11d66cf 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -26,6 +26,17 @@ jobs: with: python-version: "3.x" + # Add these steps before building + - name: Get version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV + + - name: Update version in pyproject.toml + run: | + sed -i "s/version = \".*\"/version = \"$VERSION\"/" pyproject.toml + # If you use setup.py instead, use this: + # sed -i "s/version=['\"].*['\"]/version='$VERSION'/" setup.py + - name: Build release distributions run: | # NOTE: put your own distribution build steps here.