From 1d83784a3e93dc72cf6696920f109a7d7549f609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederico=20Gon=C3=A7alves?= Date: Tue, 26 Nov 2024 10:38:26 -0300 Subject: [PATCH] ci: use MavenCentral in JReleaser (#1226) This PR updates the configuration of JReleaser to deploy the solver using Maven Central. 1. Uses two new env var for authentication: `JRELEASER_MAVENCENTRAL_USERNAME` and `JRELEASER_MAVENCENTRAL_PASSWORD`. 2. Updates the config according to the [documentation](https://jreleaser.org/guide/latest/reference/deploy/maven/maven-central.html). --- .github/workflows/release.yml | 4 ++-- jreleaser.yml | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91e2bd96a7..e2dda6e370 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,8 +104,8 @@ jobs: JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }} JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} - JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN_USER }} - JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN }} + JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN_USER }} + JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN }} - name: JReleaser release output uses: actions/upload-artifact@v4 diff --git a/jreleaser.yml b/jreleaser.yml index 1565c46ce7..49eea31ff1 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -34,14 +34,13 @@ release: deploy: maven: - nexus2: - maven-central: + mavenCentral: + timefold: active: ALWAYS - url: https://s01.oss.sonatype.org/service/local + url: https://central.sonatype.com/api/v1/publisher + authorization: BASIC # TODO Remove verifyPom tag, hack for https://github.com/jreleaser/jreleaser/issues/1397 verifyPom: false - closeRepository: true - releaseRepository: false stagingRepositories: - "target/staging-deploy" artifactOverrides: