From f41860257d043b992ec1849b3ad6d5eec8b206ad Mon Sep 17 00:00:00 2001 From: Phillipp Glanz <6745190+TheMeinerLP@users.noreply.github.com> Date: Tue, 28 May 2024 15:44:01 +0200 Subject: [PATCH] Change bom deployment --- .github/workflows/build.yml | 2 ++ bom/build.gradle.kts | 68 +++++++++++++++++++++++++------------ 2 files changed, 49 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c85516bfbb..436d2c7b142 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,4 +44,6 @@ jobs: ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}" ORG_GRADLE_PROJECT_onelitefeatherSigningKey: "${{ secrets.ONELITEFEATHER_GPG_KEY }}" ORG_GRADLE_PROJECT_onelitefeatherSigningPassword: "${{ secrets.ONELITEFEATHER_GPG_PASSWORD }}" + ORG_GRADLE_PROJECT_signingKey: "${{ secrets.ONELITEFEATHER_GPG_KEY }}" + ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.ONELITEFEATHER_GPG_PASSWORD }}" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts index f47aeec012e..c984a406007 100644 --- a/bom/build.gradle.kts +++ b/bom/build.gradle.kts @@ -1,7 +1,6 @@ plugins { id("io.github.gradlebom.generator-plugin") version "1.0.0.Final" - id("net.kyori.indra") - id("net.kyori.indra.publishing") + id("io.github.gradle-nexus.publish-plugin") version "2.0.0" signing } @@ -19,28 +18,55 @@ bomGenerator { includeDependency("net.onelitefeather.microtus.testing", "testing", version) } -indra { - github("OneLiteFeatherNET", "Microtus") { - ci(true) - publishing(false) +signing { + if (!project.hasProperty("skip.signing") && !version.toString().endsWith("-SNAPSHOT")) { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) + signing.isRequired + sign(publishing.publications) } - mitLicense() - signWithKeyFromPrefixedProperties("onelitefeather") - description = "Bill of materials for Microtus projects." - configurePublications { - pom { - developers { - developer { - id.set("themeinerlp") - name.set("Phillipp Glanz") - email.set("p.glanz@madfix.me") +} +publishing { + publications { + create("maven") { + + pom { + name.set(project.name) + description.set("Bill of materials for Microtus projects.") + url.set("https://github.com/OneLiteFeatherNET/microtus") + + licenses { + license { + name.set("The MIT License") + url.set("https://opensource.org/licenses/MIT") + distribution.set("repo") + } + } + developers { + developer { + id.set("themeinerlp") + name.set("Phillipp Glanz") + email.set("p.glanz@madfix.me") + } + developer { + id.set("theEvilReaper") + name.set("Steffen Wonning") + email.set("steffenwx@gmail.com") + } } - developer { - id.set("theEvilReaper") - name.set("Steffen Wonning") - email.set("steffenwx@gmail.com") + scm { + url.set("https://github.com/OneLiteFeatherNET/microtus") + connection.set("scm:git:https://github.com/OneLiteFeatherNET/microtus.git") + developerConnection.set("scm:git:git@github.com:OneLiteFeatherNET/microtus.git") + tag.set("${project.version}") + } + + issueManagement{ + system.set("GitHub") + url.set("https://github.com/OneLiteFeatherNET/microtus/issues") } } } } -} \ No newline at end of file +}