diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ab530d..aa125aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -381,8 +381,8 @@ commands: - run: name: "Generate project settings: << parameters.gradle-project-dir >>" command: | - echo "sonatype.username=$SONATYPE_USERNAME" >> gradle.properties - echo "sonatype.password=$SONATYPE_PASSWORD" >> gradle.properties + echo "sonatype.username=$MAVEN_CENTRAL_TOKEN_USERNAME" >> gradle.properties + echo "sonatype.password=$MAVEN_CENTRAL_TOKEN_PASSWORD" >> gradle.properties echo "signing.keyId=$SONATYPE_SIGNING_KEY_ID" >> gradle.properties echo "signing.password=$SONATYPE_SIGNING_PASSWORD" >> gradle.properties @@ -459,7 +459,7 @@ commands: steps: - add_ssh_keys: fingerprints: - - "SHA256:S2ePnorqFC8o6n1TqIbzRLAA/rokvvahy2HH6HclUIc" # key with write access to push the tag + - "SHA256:eqClQVpNhawrgA7rkup9dJjwYSeD+UkSKI+sNHubI/o" # key with write access to push the tag - run: name: "Push sonatype git tag" command: | @@ -573,6 +573,31 @@ jobs: gradle-target: dependencies - save_gradle_cache + print-release-instructions: + executor: small-linux-generic-executor + description: "Print manual publishing instructions" + steps: + - run: + name: "📋 Manual Publishing Instructions" + command: | + cat \<< 'EOF' + ============================================================ + ⚠️ IMPORTANT: Manual Publishing Required + ============================================================ + + Before approving the workflow, complete these steps: + + 1. Go to https://central.sonatype.com/publishing/deployments + 2. Find the latest VALIDATED deployment for this release + 3. Click "Publish" button + 4. Wait 15-30 minutes for Maven Central sync + 5. Verify publication: + curl https://repo.maven.apache.org/maven2/com/twilio/sync-android-kt/maven-metadata.xml + 6. Then approve the workflow to run CDN pin + + ============================================================ + EOF + test-sdk-android: executor: small-linux-generic-executor description: "Test" @@ -1234,21 +1259,22 @@ workflows: - prepare-release-tool - prepare-dependencies mentions: "@msgsdk-team" - - approve-release-android: + - print-release-instructions: + <<: *release-android-tag-filter + requires: + - prepare-release-tool + - prepare-dependencies + - approve-after-maven-central-publish: <<: *release-android-tag-filter type: approval requires: - notify-slack-release-android + - print-release-instructions - pin-sdk-android: <<: *release-android-tag-filter context: rtd-ci-build-publish-snapshot requires: - - approve-release-android - - promote-to-release-sdk-android: - <<: *release-android-tag-filter - context: rtd-ci-build-publish-snapshot - requires: - - pin-sdk-android + - approve-after-maven-central-publish promote-to-release-ios: jobs: diff --git a/build.gradle b/build.gradle index ba8bd5f..cd5b668 100644 --- a/build.gradle +++ b/build.gradle @@ -38,6 +38,12 @@ if (project.hasProperty('disable-metadata-subtasks')) { nexusPublishing { repositories { sonatype { + // Sonatype Central Portal OSSRH Staging API + // Maintains staging/promote workflow (not direct publishing) + nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/") + snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/") + + // Central Portal token (not legacy credentials) username = project.getProperty('sonatype.username') password = project.getProperty('sonatype.password') packageGroup = "com.twilio" diff --git a/sdk/utils/shared-internal-version.gradle b/sdk/utils/shared-internal-version.gradle index 4277e0c..7075178 100644 --- a/sdk/utils/shared-internal-version.gradle +++ b/sdk/utils/shared-internal-version.gradle @@ -1,3 +1,3 @@ ext { - sharedInternalVersion = "3.0.0" + sharedInternalVersion = "2.1.1" } diff --git a/sdk/utils/shared-public-version.gradle b/sdk/utils/shared-public-version.gradle index e415e47..08b26a2 100644 --- a/sdk/utils/shared-public-version.gradle +++ b/sdk/utils/shared-public-version.gradle @@ -1,3 +1,3 @@ ext { - sharedPublicVersion = "1.2.2" + sharedPublicVersion = "1.2.1" } diff --git a/sdk/utils/twilsock-version.gradle b/sdk/utils/twilsock-version.gradle index 2165239..f164e19 100644 --- a/sdk/utils/twilsock-version.gradle +++ b/sdk/utils/twilsock-version.gradle @@ -1,3 +1,3 @@ ext { - twilsockVersion = "3.1.2" + twilsockVersion = "3.2.0" } diff --git a/tools/rtd-sdk-cdn-pin/fetch/common/fetch-sonatype-android.sh b/tools/rtd-sdk-cdn-pin/fetch/common/fetch-sonatype-android.sh index 8f507e7..776da08 100755 --- a/tools/rtd-sdk-cdn-pin/fetch/common/fetch-sonatype-android.sh +++ b/tools/rtd-sdk-cdn-pin/fetch/common/fetch-sonatype-android.sh @@ -8,16 +8,18 @@ function fetchFromSonatype() { local SONATYPE_RELEASE_VERSION=$4 if [[ ("${SONATYPE_RELEASE_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$) || ("${SONATYPE_RELEASE_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$) ]]; then - REMOTE_REPOSITORY="sonatype-twilio::::https://oss.sonatype.org/content/repositories/$SONATYPE_REPO_ID" + # Fetch from Maven Central (must be published before running this script) + # Note: SONATYPE_REPO_ID is not used for Maven Central, but kept for compatibility + REMOTE_REPOSITORY="central::::https://repo.maven.apache.org/maven2" ARTIFACT="com.twilio:${SONATYPE_ARTIFACT_ID}:${SONATYPE_RELEASE_VERSION}:jar:dokka" ARTIFACT_FILENAME="$SONATYPE_ARTIFACT_ID-$SONATYPE_RELEASE_VERSION-dokka.jar" else echo "Version ${SONATYPE_RELEASE_VERSION} is not Release or Release Candidate" >&2 # write error message to stderr exit 1 fi - echo "==== Fetching package $SONATYPE_ARTIFACT_ID version $SONATYPE_RELEASE_VERSION from Sonatype $REMOTE_REPOSITORY ====" + echo "==== Fetching package $SONATYPE_ARTIFACT_ID version $SONATYPE_RELEASE_VERSION from Maven Central ====" - mvn dependency:get -settings sonatype-settings.xml -DremoteRepositories="$REMOTE_REPOSITORY" -Dartifact="$ARTIFACT" -Dtransitive=false || exit 1 + mvn dependency:get -DremoteRepositories="$REMOTE_REPOSITORY" -Dartifact="$ARTIFACT" -Dtransitive=false || exit 1 mkdir -p "$RESULT_ARTIFACTS_DIR/sdk/build/docs/dokka/$SONATYPE_ARTIFACT_ID" unzip "$HOME/.m2/repository/com/twilio/$SONATYPE_ARTIFACT_ID/$SONATYPE_RELEASE_VERSION/$ARTIFACT_FILENAME" -d "$RESULT_ARTIFACTS_DIR/sdk/build/docs/dokka/$SONATYPE_ARTIFACT_ID" || exit 1