From 40ec86cea13f4befa3f12628e00a213d5bd228f3 Mon Sep 17 00:00:00 2001 From: Saurabh Jain Date: Sat, 9 May 2026 18:29:04 +0200 Subject: [PATCH] fix(release): add non-blocking Maven Central propagation verify MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the workflow reported "Deploy successful" the moment Sonatype Central validated the upload (per the v8.0.0 release at 2026-05-09 15:37Z), then proceeded straight to creating the GitHub Release. But actual public availability on `repo1.maven.org/maven2` lags by 10-30 minutes for typical releases — operators were left guessing whether the release was truly consumable. Add a polling step between `mvn deploy` and the GitHub Release that checks `repo1.maven.org` for the artifact .pom directly. Up to 30 minutes (60 × 30s). Non-blocking via `continue-on-error: true` so that: - Fast propagation: workflow reports Maven Central availability in under a minute and the GH release fires. - Slow propagation (>30min): polling step warns and the GH release still fires, leaving the operator with a clear pointer to the Sonatype publish dashboard for follow-up. Verified locally that the new polling logic returns success on first attempt against both the prior v7.1.0 release and the just-published v8.0.0 (which has now propagated since the v8.0.0 release ran). Signed-off-by: Saurabh Jain --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82cda59..02bf105 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,6 +164,33 @@ jobs: sleep 60 done + - name: Verify version is live on Maven Central + # `mvn deploy` reports "Deploy successful" the moment the artifact is + # validated by Sonatype Central, but actual public availability on + # repo1.maven.org/maven2 lags by 10-30 minutes for typical releases. + # We poll up to ~30 minutes (60 × 30s) so the workflow's "completed" + # state aligns with public-availability rather than just upload-success. + # Non-blocking: a failure here does NOT fail the workflow (the GH release + # step still fires) — propagation can occasionally exceed 30 min, in + # which case we want the GH release published anyway and the warning + # surfaced for operator follow-up. + continue-on-error: true + run: | + VERSION="${{ steps.version.outputs.VERSION }}" + POM_URL="https://repo1.maven.org/maven2/com/getaxonflow/axonflow-sdk/${VERSION}/axonflow-sdk-${VERSION}.pom" + for i in $(seq 1 60); do + if curl -sf -o /dev/null "$POM_URL"; then + echo "✅ axonflow-sdk:${VERSION} is live on Maven Central (after ${i} attempt(s) — ~$((i*30))s)" + echo " $POM_URL" + exit 0 + fi + echo "Waiting for Maven Central propagation… (attempt ${i}/60)" + sleep 30 + done + echo "::warning::axonflow-sdk:${VERSION} not yet on repo1.maven.org after 30 minutes." + echo "::warning::Sonatype \`mvn deploy\` succeeded earlier in this job; propagation is sometimes >30 min." + echo "::warning::Verify manually at https://central.sonatype.com/publishing/deployments and $POM_URL ; not blocking the GitHub release." + - name: Download release body artifact uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: