From 207f87bd63bc3d6dac7f5e52d6cbf4124cc3bb40 Mon Sep 17 00:00:00 2001 From: Gonzalo Rafuls Date: Thu, 18 Dec 2025 22:40:15 +0100 Subject: [PATCH] fix: CI bump version --- .github/workflows/publish.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8deab1f..cee962a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,11 +37,18 @@ jobs: - name: Bump version run: | - if git rev-parse "v$(bump2version --dry-run --list patch | grep new_version | sed -r s,"^.*=",,)" >/dev/null 2>&1; then - echo "Tag already exists. Skipping version bump." - else - bump2version patch - fi + # Keep bumping until we find a version without an existing tag + for i in {1..10}; do + NEW_VERSION=$(bump2version --dry-run --list patch | grep new_version | sed -r 's/^.*=//') + if git rev-parse "v${NEW_VERSION}" >/dev/null 2>&1; then + echo "Tag v${NEW_VERSION} already exists, bumping past it..." + bump2version patch --no-tag --no-commit --allow-dirty + else + echo "Bumping to v${NEW_VERSION}" + bump2version patch + break + fi + done - name: Build package run: python setup.py sdist bdist_wheel