From 835820cfdf6e5eb46ec987a3b2047906353e3220 Mon Sep 17 00:00:00 2001 From: iTitus Date: Sun, 21 Feb 2021 18:51:13 +0100 Subject: [PATCH] update build pipeline --- .github/workflows/release.yml | 6 +++--- build.gradle | 20 ++++---------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4a217f..be6abaa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,9 +58,9 @@ jobs: prerelease: false - name: Publish to Maven Central - run: ./gradlew publish closeAndReleaseRepository + run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository env: - ORG_GRADLE_PROJECT_ossrh_username: ${{ secrets.OSSRH_USERNAME }} - ORG_GRADLE_PROJECT_ossrh_password: ${{ secrets.OSSRH_PASSWORD }} + ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.OSSRH_USERNAME }} + ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.OSSRH_PASSWORD }} ORG_GRADLE_PROJECT_signing_key: ${{ secrets.SIGNING_KEY }} ORG_GRADLE_PROJECT_signing_password: ${{ secrets.SIGNING_PASSWORD }} diff --git a/build.gradle b/build.gradle index 5b99679..e8e9a5c 100644 --- a/build.gradle +++ b/build.gradle @@ -2,12 +2,11 @@ plugins { id 'java-library' id 'maven-publish' id 'signing' - id 'io.codearte.nexus-staging' version '0.22.0' - id 'de.marcphilipp.nexus-publish' version '0.4.0' + id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' } group = 'io.github.ititus' -version = '1.4.2' +version = '1.4.3' wrapper { distributionType Wrapper.DistributionType.ALL @@ -42,9 +41,6 @@ test { useJUnitPlatform() } -def ossrhUsername = findProperty("ossrh_username") -def ossrhPassword = findProperty("ossrh_password") - publishing { publications { MyPublication(MavenPublication) { @@ -86,17 +82,9 @@ signing { sign publishing.publications.MyPublication } -nexusStaging { - username = ossrhUsername - password = ossrhPassword -} - nexusPublishing { - connectTimeout = clientTimeout = java.time.Duration.ofHours(1) + connectTimeout = clientTimeout = Duration.ofHours(1) repositories { - sonatype { - username = ossrhUsername - password = ossrhPassword - } + sonatype {} } }