Skip to content

chore: fix version bump workflow#6

Merged
brendan-ch merged 1 commit into
mainfrom
chore/fix-versioning-workflow
Jun 15, 2026
Merged

chore: fix version bump workflow#6
brendan-ch merged 1 commit into
mainfrom
chore/fix-versioning-workflow

Conversation

@brendan-ch

Copy link
Copy Markdown
Owner

Summary

The Bump version workflow's most recent run failed in ~11s at the push step:

fatal: no branch named 'chore/versioning-workflow'

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 out github.ref, which is main when dispatched from main), and as a side effect committed directly onto main. A second latent bug followed: gh pr create ran without a token, so it would have failed auth even if the push had succeeded.

Changes

  • Branch creation — replaced the bogus git branch -m with git checkout -B chore/bump-version-<ver>, so a proper branch is created off whatever ref was dispatched. -B keeps re-runs idempotent.
  • Git identity — set github-actions[bot] explicitly (the prior run only worked by falling back to the runner default).
  • PR auth — added GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} to the gh pr create step.
  • Runner — moved off macos-26 + the xcode-select step to ubuntu-latest; this job is a pure sed edit of project.pbxproj, so no Xcode/build is needed. Switched BSD sed -i '' to GNU sed -i and dropped the unused .bak copy.

Test plan

  • Diagnosed from the failed run logs (gh run view --log-failed); confirmed the failed run never pushed, so remote main is untouched.
  • YAML validated.
  • Dispatch the Bump version workflow once after merge to confirm it creates the branch + draft PR end-to-end (can only be verified by an actual workflow_dispatch run).

🤖 Generated with Claude Code

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>
@brendan-ch brendan-ch merged commit 0d642ad into main Jun 15, 2026
1 check passed
@brendan-ch brendan-ch deleted the chore/fix-versioning-workflow branch June 15, 2026 00:44
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.

1 participant