ci: release workflow auto-creates publish branch#29
Merged
Conversation
Contributor
Test results — macos-latest ✅1054 · ubuntu-latest ✅1054 · windows-latest ✅1051Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
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.
What
The publish step assumed the publish branch already existed, running
git fetch origin <publish-branch>andgit worktree add … origin/<publish-branch>unconditionally. On a repo's first release that branch doesn't exist yet, so the run died with:By then it had already pushed the release commit to the dev branch and created the version tags, leaving a half-finished release.
The step now checks whether the branch exists on the remote first. If it does, behavior is unchanged. If it doesn't, the worktree is seeded from the released commit and the step's existing
git push origin HEAD:<publish-branch>creates the branch.Seeding from
HEADrather than an empty orphan branch is deliberate:merge-feed --into _publish/DependencyControl.jsonexits non-zero when that file is missing, and the step'srsyncexcludesDependencyControl.json, so an orphan branch would fail one step later instead.Why it matters beyond this repo
reusable-publish-release.ymlis the building block third-party package repos call, so every one of them would hit this on their first release. The README's setup step told them to create the branch by hand, which is no longer necessary.Testing
Not exercised by a real run. This surfaced while releasing DependencyControl 0.7.0, and that release was unblocked by creating the
publishbranch manually, so the new bootstrap path hasn't run in CI yet. It will first execute on the next package repo that releases without a publish branch.🤖 Generated with Claude Code