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