From 34a98ed97083bb1756c3879b042712edc50e65ab Mon Sep 17 00:00:00 2001 From: KC Berg Date: Wed, 9 Jul 2025 04:12:33 -0600 Subject: [PATCH] ci: fix tag creation by extracting version from pyproject.toml --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df60688..5d36a62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: git config user.email "${{ secrets.GH_DEPLOY_EMAIL }}" - name: Set up git for pushing run: | - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git + git remote set-url origin https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git - name: Show git user and remote run: | git config --get user.name @@ -57,6 +57,11 @@ jobs: git branch -a git status git rev-parse --abbrev-ref HEAD + - name: Get version from pyproject.toml + id: get_version + run: | + VERSION=$(grep '^version =' pyproject.toml | head -1 | cut -d '"' -f2) + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Create and push tag for current version (with verbose logging) run: | git remote -v @@ -78,7 +83,7 @@ jobs: git config user.email "${{ secrets.GH_DEPLOY_EMAIL }}" - name: Set up git for pushing run: | - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git + git remote set-url origin https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git - name: Bump patch version with bumpver run: bumpver update --patch --commit - name: Push version bump commit