From 6a90427970d99531287ba5bb90362deed6402936 Mon Sep 17 00:00:00 2001 From: Javier Delgado Aylagas Date: Thu, 5 Dec 2024 10:32:16 +0100 Subject: [PATCH] Test publish --- .github/workflows/release.yml | 5 +++-- mavencentral.gradle | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 034361c..5113b8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ name: "Create release" on: + push: release: types: [published] jobs: @@ -15,7 +16,7 @@ jobs: java-version: '17' - name: Build library - run: 'bash ./gradlew clean :library:assembleRelease' + run: 'bash ./gradlew clean :library:assembleRelease :library:signReleasePublication :library:signNoopPublication' - name: Release library env: @@ -24,5 +25,5 @@ jobs: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }} - run: "bash ./gradlew publishReleasePublicationToSonatypeRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} publishNoopPublicationToSonatypeRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} + run: "bash ./gradlew publishReleasePublicationToSonatypeRepository -DSNAPSHOT_VERSION=${{ github.event.release.tag_name }} publishNoopPublicationToSonatypeRepository -DLIBRARY_VERSION=${{ github.event.release.tag_name }} --max-workers 1 closeAndReleaseStagingRepositories" diff --git a/mavencentral.gradle b/mavencentral.gradle index 3ed68e1..72429e3 100644 --- a/mavencentral.gradle +++ b/mavencentral.gradle @@ -110,6 +110,10 @@ publishing { } } +tasks.named("publish") { + dependsOn(tasks.named("jar")) +} + signing { def signingKeyId = findProperty("signingKeyId") def signingKey = findProperty("signingKey")