Also publish dev branch builds to Hangar

This commit is contained in:
Nassim Jahnke 2023-08-11 20:33:47 +10:00
parent 1bf7962dc3
commit 7e53f55509
1 changed files with 19 additions and 21 deletions

View File

@ -80,27 +80,25 @@ modrinth {
} }
} }
if (isMainBranch) { // Don't spam releases until Hangar has per channel notifications hangarPublish {
hangarPublish { publications.register("plugin") {
publications.register("plugin") { version.set(suffixedVersion)
version.set(suffixedVersion) namespace("ViaVersion", "ViaVersion")
namespace("ViaVersion", "ViaVersion") channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha")
channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha") changelog.set(changelogContent)
changelog.set(changelogContent) apiKey.set(System.getenv("HANGAR_TOKEN"))
apiKey.set(System.getenv("HANGAR_TOKEN")) platforms {
platforms { register(Platforms.PAPER) {
register(Platforms.PAPER) { jar.set(tasks.shadowJar.flatMap { it.archiveFile })
jar.set(tasks.shadowJar.flatMap { it.archiveFile }) platformVersions.set(listOf(property("mcVersionRange") as String))
platformVersions.set(listOf(property("mcVersionRange") as String)) }
} register(Platforms.VELOCITY) {
register(Platforms.VELOCITY) { jar.set(tasks.shadowJar.flatMap { it.archiveFile })
jar.set(tasks.shadowJar.flatMap { it.archiveFile }) platformVersions.set(listOf(property("velocityVersion") as String))
platformVersions.set(listOf(property("velocityVersion") as String)) }
} register(Platforms.WATERFALL) {
register(Platforms.WATERFALL) { jar.set(tasks.shadowJar.flatMap { it.archiveFile })
jar.set(tasks.shadowJar.flatMap { it.archiveFile }) platformVersions.set(listOf(property("waterfallVersion") as String))
platformVersions.set(listOf(property("waterfallVersion") as String))
}
} }
} }
} }