From 0e7f7c2f7ca1e7586bb32ac31cbe9a3136d4c6b5 Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Wed, 1 Jan 2025 23:56:38 +0100 Subject: [PATCH] Fix publishing --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()}"