From 2b233feb3b49a2dac56075692571f07805a9f232 Mon Sep 17 00:00:00 2001 From: Alex Abashev Date: Sun, 1 Nov 2026 18:06:37 +0300 Subject: [PATCH] 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. --- .../main/groovy/open-java-format.release-conventions.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildSrc/src/main/groovy/open-java-format.release-conventions.gradle b/buildSrc/src/main/groovy/open-java-format.release-conventions.gradle index 34abda655..ee1ce062b 100644 --- a/buildSrc/src/main/groovy/open-java-format.release-conventions.gradle +++ b/buildSrc/src/main/groovy/open-java-format.release-conventions.gradle @@ -88,6 +88,9 @@ jreleaser { skipTag = true tagName = '{{projectVersion}}' releaseName = '{{projectVersion}}' + // The current release line; it moves when the next line starts. JReleaser assumes main otherwise, + // and when GitHub has no such branch it tries to push one, which fails from the tag's checkout. + branch = '21.X.X' // Published by hand after a look. draft = true changelog {