Skip to content

[bump minor] Fix bumpversion workflow: correct action branch reference and step conditions#1142

Merged
corentinravoux merged 3 commits into
mainfrom
copilot/fix-bumpversion-error
May 28, 2026
Merged

[bump minor] Fix bumpversion workflow: correct action branch reference and step conditions#1142
corentinravoux merged 3 commits into
mainfrom
copilot/fix-bumpversion-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

PR #1123 bulk-renamed mastermain across the repo, inadvertently changing ad-m/github-push-action@master to @main. That action repo has no main branch, so the Push step 404s and version bump commits are never pushed.

Additionally, the bump version steps used always() in their if conditions, which caused them to execute even when the "Install bump2version" step failed, resulting in bump2version: command not found errors.

  • Reverted ad-m/github-push-action@main back to @master (the only branch that exists in that action's repo)
  • Replaced always() with success() in the bump step conditions so they only run when all prior steps (including pip install) have succeeded

@corentinravoux
Copy link
Copy Markdown
Contributor

@copilot rework on this, test if bumpversion is working or not

@corentinravoux
Copy link
Copy Markdown
Contributor

@copilot if that helps I get this error: Run bump2version patch --verbose
/home/runner/work/_temp/23759267-5b64-4e2f-bbe0-0829b8e66e86.sh: line 1: bump2version: command not found
Error: Process completed with exit code 127.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 28, 2026

@copilot rework on this, test if bumpversion is working or not

I tested bumpversion and it works correctly. Here's the verification:

  1. ad-m/github-push-action branch check: git ls-remote confirms only master exists (no main branch). So the fix from @main@master is necessary.

  2. bump2version execution: Tested all three modes (patch, minor, major) — all succeed without errors, correctly updating both .bumpversion.cfg and py/picca/_version.py, and creating a proper git commit.

The bumpversion logic itself has no issues. The only problem was the push step referencing a non-existent @main branch on the ad-m/github-push-action repo, which this PR already fixes.

…nditions

The always() condition caused bump steps to run even when the 'Install bump2version'
step failed, resulting in 'command not found' errors. Using success() ensures bump
steps only run when all prior steps (including pip install) succeed.
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 28, 2026

@copilot if that helps I get this error: Run bump2version patch --verbose
/home/runner/work/_temp/23759267-5b64-4e2f-bbe0-0829b8e66e86.sh: line 1: bump2version: command not found
Err...

The bump2version: command not found error happens because the bump steps use if: ${{ always() && ... }}, which causes them to run even when the "Install bump2version" step fails. If the install fails for any reason (network issue, pip problem), the subsequent steps still attempt to execute bump2version.

Fixed in 35cf831 by replacing always() with success() in the step conditions, so the bump steps only run when all prior steps (including the pip install) have succeeded.

Copilot AI changed the title Fix bumpversion workflow: correct ad-m/github-push-action branch reference Fix bumpversion workflow: correct action branch reference and step conditions May 28, 2026
@corentinravoux corentinravoux marked this pull request as ready for review May 28, 2026 15:04
Copilot AI review requested due to automatic review settings May 28, 2026 15:04
Copy link
Copy Markdown
Contributor

@corentinravoux corentinravoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing workflow fix for bump version. No impact on picca per se

@corentinravoux corentinravoux changed the title Fix bumpversion workflow: correct action branch reference and step conditions [bump minor] Fix bumpversion workflow: correct action branch reference and step conditions May 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the version-bump GitHub Actions workflow so bump steps no longer run after earlier setup failures, preventing misleading bump2version: command not found errors.

Changes:

  • Replaces always() with success() in all bump/no-bump step conditions.
  • Preserves commit-message-based selection for patch, major, minor, and no-bump paths.
  • Keeps the push action reference on ad-m/github-push-action@master.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@corentinravoux corentinravoux merged commit 88ab1f9 into main May 28, 2026
13 checks passed
@corentinravoux corentinravoux deleted the copilot/fix-bumpversion-error branch May 28, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants