Skip to content

Commit 2b233fe

Browse files
committed
Name the release line's branch for the GitHub release
JReleaser takes main as release.github.branch unless told otherwise, and before it opens a release it looks the branch up on GitHub. A branch that is not there it creates with git push --all, which from the tag's detached checkout has nothing to push. With main gone from GitHub, the draft release of 21.0.0 failed that way, "Could not checkout branch main", while Maven Central, the Gradle Plugin Portal and the JetBrains Marketplace got the version. The branch is now 21.X.X, the current release line; it moves when the next line starts, as target-branch does in dependabot.yml. A dry run skips the lookup, so only the next tag proves the fix; jreleaserConfig shows branch and branchPush as 21.X.X.
1 parent 336a286 commit 2b233fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎buildSrc/src/main/groovy/open-java-format.release-conventions.gradle‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ jreleaser {
8888
skipTag = true
8989
tagName = '{{projectVersion}}'
9090
releaseName = '{{projectVersion}}'
91+
// The current release line; it moves when the next line starts. JReleaser assumes main otherwise,
92+
// and when GitHub has no such branch it tries to push one, which fails from the tag's checkout.
93+
branch = '21.X.X'
9194
// Published by hand after a look.
9295
draft = true
9396
changelog {

0 commit comments

Comments
 (0)