From a5b492564b294faad040f2ce91da4722bc0c1528 Mon Sep 17 00:00:00 2001 From: Tobias Schaefer Date: Mon, 16 Sep 2024 07:50:31 +0200 Subject: [PATCH] New: Generate a token to publish artifacts to the Central Repository via OSSRH. --- .github/workflows/publish-release.yml | 4 ++-- micronaut-camunda-bpm-feature/build.gradle | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 84539086..0624cac6 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -35,5 +35,5 @@ jobs: ./gradlew -Pversion=${RELEASE_VERSION} build --warning-mode=all # value 'fail' would be better but the build even this breaks: "mn create-app mytest && cd mytest && ./gradlew clean build --warning-mode fail" ./gradlew -Pversion=${RELEASE_VERSION} -Psigning.password=${SIGNING_PWD} publish --info -Dorg.gradle.internal.http.socketTimeout=180000 -Dorg.gradle.internal.http.connectionTimeout=180000 env: - OSSRH_PWD: ${{ secrets.OSSRH_PWD }} - SIGNING_PWD: ${{ secrets.SIGNING_PWD }} + OSSRH_TOKEN_USER: ${{ secrets.OSSRH_TOKEN_USER }} + OSSRH_TOKEN_PWD: ${{ secrets.OSSRH_TOKEN_PWD }} diff --git a/micronaut-camunda-bpm-feature/build.gradle b/micronaut-camunda-bpm-feature/build.gradle index 34f3eea5..ede4a908 100644 --- a/micronaut-camunda-bpm-feature/build.gradle +++ b/micronaut-camunda-bpm-feature/build.gradle @@ -121,8 +121,9 @@ publishing { maven { url = version.endsWith('SNAPSHOT') ? 'https://oss.sonatype.org/content/repositories/snapshots/' : 'https://oss.sonatype.org/service/local/staging/deploy/maven2' credentials { - username 'micronaut-camunda' - password "$System.env.OSSRH_PWD" + // see "Generating a token" https://central.sonatype.org/publish/generate-token/ + username "$System.env.OSSRH_TOKEN_USER" + password "$System.env.OSSRH_TOKEN_PWD" } } }