From 45d2a7fb687fcd9ce5922bbe9a4e8a12782333b2 Mon Sep 17 00:00:00 2001 From: Steve Drew Date: Wed, 11 Mar 2026 14:02:52 -0600 Subject: [PATCH] Fix bump-and-release when version is already current Skip the commit step if pyproject.toml already has the target version, but still create the tag and push. This avoids failing with "nothing to commit" when re-running with the same version. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/bump-and-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump-and-release.yml b/.github/workflows/bump-and-release.yml index 234b4c4..56a7746 100644 --- a/.github/workflows/bump-and-release.yml +++ b/.github/workflows/bump-and-release.yml @@ -43,6 +43,10 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add pyproject.toml - git commit -m "chore: bump version to ${{ inputs.version }}" + if git diff --cached --quiet; then + echo "Version already set to ${{ inputs.version }}, skipping commit" + else + git commit -m "chore: bump version to ${{ inputs.version }}" + fi git tag -a "v${{ inputs.version }}" -m "Release v${{ inputs.version }}" git push origin main --follow-tags