From a06e4190abda75ffc395d2aac12587bafc1d5066 Mon Sep 17 00:00:00 2001 From: Sam Winebrake <85908068+samwinebrake@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:39:15 -0500 Subject: [PATCH] Update bump_version.yml (#1458) --- .github/workflows/bump_version.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 96bc5fa09..6ea326f01 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -81,11 +81,15 @@ jobs: # Create and checkout new branch BRANCH_NAME="version-bump-${{ github.event.pull_request.head.sha }}" git checkout -b $BRANCH_NAME + + # Get latest version from tags + LATEST_TAG=$(git tag --sort=-version:refname | head -n1) + CURRENT_VERSION=${LATEST_TAG#v} # Remove 'v' prefix + echo "Latest tag: $LATEST_TAG (version: $CURRENT_VERSION)" - # Show current version before bump, and new version - echo "Current version before bump:" - bump-my-version show current_version - bump-my-version bump ${{ steps.bump-type.outputs.type }} --verbose + # Bump version + echo "Bumping version..." + bump-my-version bump --current-version $CURRENT_VERSION ${{ steps.bump-type.outputs.type }} --config-file pyproject.toml --verbose echo "Version after bump:" bump-my-version show current_version