Skip to content

Commit e2b5858

Browse files
fix(release): add non-blocking Maven Central propagation verify (#175)
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 <saurabhjain1592@gmail.com>
1 parent 551dfbf commit e2b5858

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,33 @@ jobs:
164164
sleep 60
165165
done
166166
167+
- name: Verify version is live on Maven Central
168+
# `mvn deploy` reports "Deploy successful" the moment the artifact is
169+
# validated by Sonatype Central, but actual public availability on
170+
# repo1.maven.org/maven2 lags by 10-30 minutes for typical releases.
171+
# We poll up to ~30 minutes (60 × 30s) so the workflow's "completed"
172+
# state aligns with public-availability rather than just upload-success.
173+
# Non-blocking: a failure here does NOT fail the workflow (the GH release
174+
# step still fires) — propagation can occasionally exceed 30 min, in
175+
# which case we want the GH release published anyway and the warning
176+
# surfaced for operator follow-up.
177+
continue-on-error: true
178+
run: |
179+
VERSION="${{ steps.version.outputs.VERSION }}"
180+
POM_URL="https://repo1.maven.org/maven2/com/getaxonflow/axonflow-sdk/${VERSION}/axonflow-sdk-${VERSION}.pom"
181+
for i in $(seq 1 60); do
182+
if curl -sf -o /dev/null "$POM_URL"; then
183+
echo "✅ axonflow-sdk:${VERSION} is live on Maven Central (after ${i} attempt(s) — ~$((i*30))s)"
184+
echo " $POM_URL"
185+
exit 0
186+
fi
187+
echo "Waiting for Maven Central propagation… (attempt ${i}/60)"
188+
sleep 30
189+
done
190+
echo "::warning::axonflow-sdk:${VERSION} not yet on repo1.maven.org after 30 minutes."
191+
echo "::warning::Sonatype \`mvn deploy\` succeeded earlier in this job; propagation is sometimes >30 min."
192+
echo "::warning::Verify manually at https://central.sonatype.com/publishing/deployments and $POM_URL ; not blocking the GitHub release."
193+
167194
- name: Download release body artifact
168195
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
169196
with:

0 commit comments

Comments
 (0)