From c5e5433ddb11953c1591884f7faf0bbcc2189571 Mon Sep 17 00:00:00 2001 From: cb-jit-bhuin Date: Fri, 21 Aug 2026 11:40:13 +0530 Subject: [PATCH] Promote OSSRH staging to Central Portal from the same CodeBuild IP. Gradle maven-publish only PUTs artifacts; without this POST the files never show in the Publisher Portal or on Maven Central. --- build-config/buildspec-prod.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-config/buildspec-prod.yml b/build-config/buildspec-prod.yml index dcdea53..bf6c09f 100644 --- a/build-config/buildspec-prod.yml +++ b/build-config/buildspec-prod.yml @@ -20,6 +20,12 @@ phases: - VERSION=$(grep 'versionName' $CODEBUILD_SRC_DIR/chargebee/build.gradle | head -n 1 | cut -d'"' -f2) - ./gradlew clean - ./gradlew chargebee:publishReleasePublicationToMavenRepository + - | + token=$(printf '%s:%s' "$maven_username" "$maven_password" | base64 | tr -d '\n') + curl --fail --location --request POST \ + "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.chargebee" \ + --header "Authorization: Bearer ${token}" + finally: - | if [ "$CODEBUILD_BUILD_SUCCEEDING" = "0" ]; then