Setup auto hangar publishing

This commit is contained in:
Jason Penilla committed 2023-04-13 18:12:33 -07:00
1 parent 2f3a2a66f7
commit 4c60d0f472
4 files changed
+54 -2

No files matched your search

+30
View File
@@ -1,9 +1,12 @@
import io.papermc.hangarpublishplugin.model.Platforms
plugins {
id("carbon.shadow-platform")
id("net.minecrell.plugin-yml.bukkit")
id("paper-plugin-yml")
id("xyz.jpenilla.run-paper")
id("carbon.permissions")
id("io.papermc.hangar-publish-plugin")
}
dependencies {
@@ -74,3 +77,30 @@ carbonPermission.permissions.get().forEach {
}
}
}
val projectVer = project.version as String
hangarPublish.publications.register("plugin") {
version.set(projectVer)
owner.set("Vicarious")
slug.set("Carbon")
channel.set(if (projectVer.contains("+beta.")) "Beta" else "Release")
changelog.set(releaseNotes)
apiKey.set(providers.environmentVariable("HANGAR_UPLOAD_KEY"))
platforms.register(Platforms.PAPER) {
jar.set(carbonPlatform.jarTask.flatMap { it.archiveFile })
platformVersions.add("1.19.4")
dependencies {
url("LuckPerms", "https://luckperms.net/")
url("EssentialsDiscord", "https://essentialsx.net/") {
required.set(false)
}
url("DiscordSRV", "https://www.spigotmc.org/resources/discordsrv.18494/") {
required.set(false)
}
url("PlaceholderAPI", "https://www.spigotmc.org/resources/placeholderapi.6245/") {
required.set(false)
}
}
}
}