diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yml similarity index 100% rename from .github/workflows/publish.yaml rename to .github/workflows/publish.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d5515f2..3087c297 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,8 +18,8 @@ jobs: uses: gradle/actions/setup-gradle@v4 - name: release env: - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + CENTRAL_SONATYPE_USERNAME: ${{ secrets.CENTRAL_SONATYPE_USERNAME }} + CENTRAL_SONATYPE_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_PASSWORD }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: | diff --git a/build.gradle.kts b/build.gradle.kts index 99fa6980..8b8476da 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -139,7 +139,14 @@ subprojects { tasks.withType { onlyIf { System.getenv("GPG_PRIVATE_KEY") != null } } } -nexusPublishing.repositories.sonatype { - username.set(System.getenv("SONATYPE_USERNAME")) - password.set(System.getenv("SONATYPE_PASSWORD")) +// See https://github.com/gradle-nexus/publish-plugin. +nexusPublishing { + repositories { + sonatype { + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + username = System.getenv("CENTRAL_SONATYPE_USERNAME") + password = System.getenv("CENTRAL_SONATYPE_PASSWORD") + } + } }