chore: fix version bump workflow#6
Merged
Merged
Conversation
The Bump version workflow failed at the push step with "fatal: no branch named 'chore/versioning-workflow'": it tried to rename a non-existent branch (a leftover from when the workflow was authored on that branch), and committed directly onto main as a side effect. - Create the branch with `git checkout -B chore/bump-version-<ver>` instead of renaming, so it works regardless of the dispatched ref - Set github-actions[bot] git identity explicitly - Pass GH_TOKEN to `gh pr create` so the PR step can authenticate - Move the job off macos-26/Xcode to ubuntu-latest (pure sed edit, no build needed); switch BSD `sed -i ''` to GNU `sed -i` - Drop the unused .bak copy Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Bump version workflow's most recent run failed in ~11s at the push step:
The step ran
git branch -m "chore/versioning-workflow" "$BRANCH_NAME"— a leftover from when the workflow was authored on that branch. It tried to rename a branch that doesn't exist (the workflow checks outgithub.ref, which ismainwhen dispatched from main), and as a side effect committed directly ontomain. A second latent bug followed:gh pr createran without a token, so it would have failed auth even if the push had succeeded.Changes
git branch -mwithgit checkout -B chore/bump-version-<ver>, so a proper branch is created off whatever ref was dispatched.-Bkeeps re-runs idempotent.github-actions[bot]explicitly (the prior run only worked by falling back to the runner default).GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}to thegh pr createstep.macos-26+ thexcode-selectstep toubuntu-latest; this job is a puresededit ofproject.pbxproj, so no Xcode/build is needed. Switched BSDsed -i ''to GNUsed -iand dropped the unused.bakcopy.Test plan
gh run view --log-failed); confirmed the failed run never pushed, so remotemainis untouched.workflow_dispatchrun).🤖 Generated with Claude Code