Fix publishing

This commit is contained in:
FlorianMichael 2025-01-01 23:56:38 +01:00
parent 73abfef6b0
commit 0e7f7c2f7c
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -78,7 +78,8 @@ Provider<String> 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()}"