From d90181ef894eb6b0a411d6c03ca75007ab9b38ef Mon Sep 17 00:00:00 2001 From: Ahmed Abbas Date: Thu, 4 Jun 2026 04:22:09 +0300 Subject: [PATCH] fix(release): supply Maven Central creds as ORG_GRADLE_PROJECT_ props The vanniktech maven-publish plugin reads the Gradle properties `mavenCentralUsername`/`mavenCentralPassword`, which Gradle populates from the environment only when prefixed `ORG_GRADLE_PROJECT_`. release.yml exported the secrets as `MAVEN_CENTRAL_USERNAME`/`MAVEN_CENTRAL_PASSWORD`, so the plugin never saw them and the publish step failed with 'mavenCentralUsername not found'. Rename to the prefixed form (same convention the signing creds beside them already use); secret references unchanged. (qs-04.) Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44e3dc4e..d1f94a7f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -125,8 +125,13 @@ jobs: # Sonatype Central Portal credentials. Generate these in the # Central Portal UI (https://central.sonatype.com) → user tokens. # See RELEASE.md §"Secrets" for the exact acquisition steps. - MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + # Exposed as Gradle project properties (`mavenCentralUsername` / + # `mavenCentralPassword`) via the `ORG_GRADLE_PROJECT_` prefix — + # the same convention as the `ORG_GRADLE_PROJECT_signingInMemoryKey*` + # lines below. The vanniktech maven-publish plugin reads these + # properties to authenticate `publishToMavenCentral`. (qs-04.) + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} # In-memory GPG signing key for vanniktech's plugin. Export the # private key with `gpg --armor --export-secret-keys `