From 44bd2933ec63289e01f2543642e735f83aed19e2 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Tue, 20 Oct 2026 13:09:11 +0600 Subject: [PATCH] Retry published package installation during release verification --- .github/workflows/pypi_publish.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_publish.yaml b/.github/workflows/pypi_publish.yaml index 34cf9ad..5354f87 100644 --- a/.github/workflows/pypi_publish.yaml +++ b/.github/workflows/pypi_publish.yaml @@ -104,5 +104,15 @@ jobs: RELEASE_VERSION: ${{ needs.release.outputs.version }} run: | uv venv --python 3.11 /tmp/published - uv pip install --refresh-package github-action-utils --python /tmp/published/bin/python "github-action-utils==$RELEASE_VERSION" + for attempt in {1..6}; do + if uv pip install --refresh-package github-action-utils --python /tmp/published/bin/python "github-action-utils==$RELEASE_VERSION"; then + break + fi + if [ "$attempt" -eq 6 ]; then + echo "::error::Could not install github-action-utils==$RELEASE_VERSION after 6 attempts." + exit 1 + fi + echo "Published package installation failed; retrying in 10 seconds ($attempt/6)." + sleep 10 + done /tmp/published/bin/python scripts/check_distribution.py --published-version "$RELEASE_VERSION"