diff --git a/build.gradle b/build.gradle index 8859eae..b091c6a 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,8 @@ Provider branchName() { def branch = branchName().get() def baseVersion = project.maven_version def isRelease = !baseVersion.contains('-') -if (!isRelease) { // Only publish releases from the main branch +def isMainBranch = branch == "main" +if (!isRelease || isMainBranch) { // Only publish releases from the main branch def suffixedVersion = isRelease ? baseVersion : baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER") def commitHash = latestCommitHash().get() def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaAprilFools/commit/${commitHash}) ${latestCommitMessage().get()}"