Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 16:40:10 +01:00
[ci skip] Only publish releases from the main branch
Dieser Commit ist enthalten in:
Ursprung
489b28e520
Commit
e30dd63b3c
@ -46,15 +46,17 @@ publishShadowJar()
|
|||||||
val branch = rootProject.branchName()
|
val branch = rootProject.branchName()
|
||||||
val baseVersion = project.version as String
|
val baseVersion = project.version as String
|
||||||
val isRelease = !baseVersion.contains('-')
|
val isRelease = !baseVersion.contains('-')
|
||||||
val suffixedVersion = if (isRelease) baseVersion else baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
|
val isMainBranch = branch == "master"
|
||||||
val changelogContent = if (isRelease) {
|
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."
|
"See [GitHub](https://github.com/ViaVersion/ViaVersion) for release notes."
|
||||||
} else {
|
} else {
|
||||||
val commitHash = rootProject.latestCommitHash()
|
val commitHash = rootProject.latestCommitHash()
|
||||||
"[$commitHash](https://github.com/ViaVersion/ViaVersion/commit/$commitHash) ${rootProject.latestCommitMessage()}"
|
"[$commitHash](https://github.com/ViaVersion/ViaVersion/commit/$commitHash) ${rootProject.latestCommitMessage()}"
|
||||||
}
|
}
|
||||||
val isMainBranch = branch == "master"
|
|
||||||
modrinth {
|
modrinth {
|
||||||
val mcVersions: List<String> = (property("mcVersions") as String)
|
val mcVersions: List<String> = (property("mcVersions") as String)
|
||||||
.split(",")
|
.split(",")
|
||||||
.map { it.trim() }
|
.map { it.trim() }
|
||||||
@ -78,9 +80,9 @@ modrinth {
|
|||||||
optional.project("viafabric")
|
optional.project("viafabric")
|
||||||
optional.project("viafabricplus")
|
optional.project("viafabricplus")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hangarPublish {
|
hangarPublish {
|
||||||
publications.register("plugin") {
|
publications.register("plugin") {
|
||||||
version.set(suffixedVersion)
|
version.set(suffixedVersion)
|
||||||
id.set("ViaVersion")
|
id.set("ViaVersion")
|
||||||
@ -102,4 +104,5 @@ hangarPublish {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren