diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 9f8eeb9..181052d 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -8,8 +8,7 @@ env: ORG_GRADLE_PROJECT_BUILD_VERSION: ${{ gitea.ref_name }} ORG_GRADLE_PROJECT_DEVSOAP_GPG_KEY: ${{ secrets.GPG_DEVSOAP_PRIVATE_KEY }} ORG_GRADLE_PROJECT_DEVSOAP_GPG_PASSWORD: ${{ secrets.GPG_DEVSOAP_PASSPHRASE }} - ORG_GRADLE_PROJECT_SONATYPE_USER: ${{ secrets.SONATYPE_USER }} - ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + ORG_GRADLE_PROJECT_SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }} RUNNER_TOOL_CACHE: /toolcache jobs: diff --git a/build.gradle b/build.gradle index a0f578c..f9059e4 100644 --- a/build.gradle +++ b/build.gradle @@ -42,9 +42,12 @@ publishing { maven { name = "sonatype" url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") - credentials { - username = findProperty('SONATYPE_USER') as String - password = findProperty('SONATYPE_PASSWORD') as String + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "Bearer ${ findProperty('SONATYPE_TOKEN') as String }" + } + authentication { + create("header") } } }