diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dd06af1..da82e7df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: java-version: 8 - name: Build and release - run: ./gradlew githubRelease publishToSonatype # closeAndReleaseStagingRepository + run: ./gradlew githubRelease publishToSonatype closeAndReleaseStagingRepository env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} NEXUS_TOKEN_USER: ${{secrets.NEXUS_TOKEN_USER}} diff --git a/build.gradle b/build.gradle index 39b0f65b..4ee6ca37 100644 --- a/build.gradle +++ b/build.gradle @@ -34,12 +34,16 @@ tasks.named("githubRelease") { githubToken = System.getenv("GITHUB_TOKEN") newTagRevision = System.getenv("GITHUB_SHA") releaseTag = project.version + releaseName = project.version } nexusPublishing { repositories { if (System.getenv("NEXUS_TOKEN_PWD")) { - sonatype { + sonatype { // Publishing to: https://s01.oss.sonatype.org (faster instance) + nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") + snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") + username = System.getenv("NEXUS_TOKEN_USER") password = System.getenv("NEXUS_TOKEN_PWD") }