From eaf3d6f820f0f39bf645ad63e92d59ef6d1a5383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20W=C3=A4rting?= Date: Fri, 12 Jan 2024 13:54:25 +0100 Subject: [PATCH] update signing --- .github/workflows/publish.yml | 14 +++++++++----- build.gradle.kts | 36 ----------------------------------- flow/build.gradle.kts | 35 ++++++++++++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8657f00..93aefb8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,9 @@ name: Auto deploy artifacts on release on: + push: + branches: + - update_publishing release: types: [ published ] @@ -45,14 +48,15 @@ jobs: key: gradle-${{ hashFiles('checksum.txt') }} - name: Publish application - run: ./gradlew publishAllPublicationsToMavenCentralRepository + # run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache + run: ./gradlew publishAllPublicationsToMavenCentralRepository --rerun-tasks --no-configuration-cache env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} - SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} - SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} - SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + #SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} + ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} - name: Upload reports uses: actions/upload-artifact@v3 diff --git a/build.gradle.kts b/build.gradle.kts index 679ac03..5dcdf5a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask -import com.vanniktech.maven.publish.SonatypeHost import io.gitlab.arturbosch.detekt.Detekt // Top-level build file where you can add configuration options common to all sub-projects/modules. @@ -29,41 +28,6 @@ plugins { id("io.github.gradle-nexus.publish-plugin") version "1.3.0" id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2" id("com.gladed.androidgitversion") version "0.4.14" - id("org.jetbrains.dokka") version "1.9.10" - id("com.vanniktech.maven.publish") version "0.27.0" -} - - -mavenPublishing { - - publishToMavenCentral(SonatypeHost.DEFAULT) - signAllPublications() - - pom { - name.set("Billy") - description.set("Billing flow") - inceptionYear.set("2021") - url.set("https://github.com/username/mylibrary/") - licenses { - license { - name.set("MIT License") - url.set("https://opensource.org/licenses/MIT") - distribution.set("https://opensource.org/licenses/MIT") - } - } - developers { - developer { - id.set("warting") - name.set("Stefan Wärting") - url.set("https://github.com/warting/") - } - } - scm { - url.set("https://github.com/warting/billy/") - connection.set("scm:git:git://github.com/warting/billy.git") - developerConnection.set("scm:git:ssh://git@github.com/warting/billy.git") - } - } } apiValidation { diff --git a/flow/build.gradle.kts b/flow/build.gradle.kts index 712b595..5c575d5 100644 --- a/flow/build.gradle.kts +++ b/flow/build.gradle.kts @@ -3,12 +3,43 @@ import com.vanniktech.maven.publish.SonatypeHost plugins { id("com.android.library") id("kotlin-android") - id("org.jetbrains.dokka") - id("com.vanniktech.maven.publish") + id("org.jetbrains.dokka") version "1.9.10" + id("com.vanniktech.maven.publish") version "0.27.0" } +mavenPublishing { + + publishToMavenCentral(SonatypeHost.DEFAULT) + signAllPublications() + + pom { + name.set("Billy") + description.set("Billing flow") + inceptionYear.set("2021") + url.set("https://github.com/username/mylibrary/") + licenses { + license { + name.set("MIT License") + url.set("https://opensource.org/licenses/MIT") + distribution.set("https://opensource.org/licenses/MIT") + } + } + developers { + developer { + id.set("warting") + name.set("Stefan Wärting") + url.set("https://github.com/warting/") + } + } + scm { + url.set("https://github.com/warting/billy/") + connection.set("scm:git:git://github.com/warting/billy.git") + developerConnection.set("scm:git:ssh://git@github.com/warting/billy.git") + } + } +} val PUBLISH_GROUP_ID: String by extra(rootProject.group as String) val PUBLISH_VERSION: String by extra(rootProject.version as String)