3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00

[ci skip] Add Velocity and Waterfall to publish config

Dieser Commit ist enthalten in:
Nassim Jahnke 2023-08-11 00:39:45 +10:00
Ursprung ef75bd567d
Commit 34509e86c0
2 geänderte Dateien mit 14 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -2,6 +2,8 @@
projectVersion=4.8.0-23w32a-SNAPSHOT
mcVersions=1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5, 1.15.2, 1.14.4, 1.8.9
mcVersionRange=1.8-1.20.1
waterfallVersion=1.20
velocityVersion=3.2
# Gradle properties
org.gradle.daemon=true

Datei anzeigen

@ -46,13 +46,14 @@ publishShadowJar()
val branch = rootProject.branchName()
val ver = (project.version as String) + "+" + System.getenv("GITHUB_RUN_NUMBER")
val changelogContent = rootProject.lastCommitMessage()
val isMainBranch = branch == "master"
modrinth {
val mcVersions: List<String> = (property("mcVersions") as String)
.split(",")
.map { it.trim() }
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("viaversion")
versionType.set(if (branch == "master") "beta" else "alpha")
versionType.set(if (isMainBranch) "beta" else "alpha")
versionNumber.set(ver)
versionName.set("[$branch] $ver")
changelog.set(changelogContent)
@ -67,12 +68,12 @@ modrinth {
}
}
if (branch == "master") { // Don't spam releases until Hangar has per channel notifications
if (isMainBranch) { // Don't spam releases until Hangar has per channel notifications
hangarPublish {
publications.register("plugin") {
version.set(ver)
namespace("ViaVersion", "ViaVersion")
channel.set(if (branch == "master") "Snapshot" else "Alpha")
channel.set(if (isMainBranch) "Snapshot" else "Alpha")
changelog.set(changelogContent)
apiKey.set(System.getenv("HANGAR_TOKEN"))
platforms {
@ -80,6 +81,14 @@ if (branch == "master") { // Don't spam releases until Hangar has per channel no
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set(listOf(property("mcVersionRange") as String))
}
register(Platforms.VELOCITY) {
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set(listOf(property("velocityVersion") as String))
}
register(Platforms.WATERFALL) {
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set(listOf(property("waterfallVersion") as String))
}
}
}
}