Skip to content

Name the release line's branch for the GitHub release - #179

Merged
abashev merged 1 commit into
21.X.Xfrom
fix/github-release-branch
Nov 1, 2026
Merged

abashev merged 1 commit into
21.X.Xfrom
fix/github-release-branch

Conversation

@abashev

@abashev abashev commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What

The 21.0.0 release (run 41307243703) reached Maven Central, the Gradle Plugin Portal and the JetBrains Marketplace, but its draft GitHub release failed with Could not checkout branch main (Nothing to push). 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. main is gone from GitHub since the move to 21.X.X.

The fix

branch = '21.X.X' in the release conventions: the current release line, moved when the next line starts, as target-branch is in dependabot.yml.

Tests

A dry run skips the branch lookup, so only the next tag proves the fix. jreleaserConfig with -PreleaseTarget=github now shows branch: 21.X.X and branchPush: 21.X.X. 21.0.0 stays without a GitHub release: the next bugfix release, tagged after this merge, takes its place.

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.
@abashev
abashev merged commit 7ab00d7 into 21.X.X Nov 1, 2026
17 checks passed
@abashev
abashev deleted the fix/github-release-branch branch November 1, 2026 15:24
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