mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 01:55:47 +01:00
[ci skip] Only publish releases from the main branch
This commit is contained in:
parent
489b28e520
commit
e30dd63b3c
@ -46,6 +46,8 @@ publishShadowJar()
|
||||
val branch = rootProject.branchName()
|
||||
val baseVersion = project.version as String
|
||||
val isRelease = !baseVersion.contains('-')
|
||||
val isMainBranch = branch == "master"
|
||||
if (!isRelease || isMainBranch) { // Only publish releases from the main branch
|
||||
val suffixedVersion = if (isRelease) baseVersion else baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
|
||||
val changelogContent = if (isRelease) {
|
||||
"See [GitHub](https://github.com/ViaVersion/ViaVersion) for release notes."
|
||||
@ -53,7 +55,7 @@ val changelogContent = if (isRelease) {
|
||||
val commitHash = rootProject.latestCommitHash()
|
||||
"[$commitHash](https://github.com/ViaVersion/ViaVersion/commit/$commitHash) ${rootProject.latestCommitMessage()}"
|
||||
}
|
||||
val isMainBranch = branch == "master"
|
||||
|
||||
modrinth {
|
||||
val mcVersions: List<String> = (property("mcVersions") as String)
|
||||
.split(",")
|
||||
@ -103,3 +105,4 @@ hangarPublish {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user