diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1390fa..3ffface 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,8 @@ on: jobs: call-build: uses: "jpenilla/actions/.github/workflows/shared-ci.yml@master" + secrets: inherit with: + hangar-publish: true init-submodules: true artifacts-path: 'build/libs/*-all.jar' diff --git a/build.gradle.kts b/build.gradle.kts index 0c7c923..d9eb4be 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import io.papermc.hangarpublishplugin.model.Platforms import net.minecrell.pluginyml.bukkit.BukkitPluginDescription plugins { @@ -6,6 +7,7 @@ plugins { id("net.minecrell.plugin-yml.bukkit") version "0.5.2" id("xyz.jpenilla.run-paper") version "2.0.1" id("net.kyori.indra.license-header") version "3.0.1" + id("io.papermc.hangar-publish-plugin") version "0.0.3" } group = "xyz.jpenilla" @@ -102,3 +104,17 @@ bukkit { } } } + +hangarPublish.publications.register("plugin") { + version.set(project.version as String) + owner.set("jmp") + slug.set("ChessCraft") + channel.set("Release") + changelog.set(providers.environmentVariable("RELEASE_NOTES")) + platforms { + register(Platforms.PAPER) { + jar.set(tasks.shadowJar.flatMap { it.archiveFile }) + platformVersions.set(listOf("1.19")) + } + } +}