From 2450ce0de791cd68804f3c34b4e67924d23abac7 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Fri, 28 Aug 2026 12:57:54 -0700 Subject: [PATCH] Poll PyPI release readiness [skip ci] --- .github/workflows/release-candidate.yml | 2 +- bin/release.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 123f32ad..ed0c10ee 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -26,7 +26,7 @@ jobs: token: ${{ secrets.RELEASE_GH_TOKEN }} - id: version - uses: ArchiveBox/monorepo/.github/actions/prepare-release-version@baf93a10cdadc0c4cebfe610d49261fb549a90ee + uses: ArchiveBox/monorepo/.github/actions/prepare-release-version@afb379c6279fdeeca7aa4408d9589cd969b64ae7 with: package: archivebox branch: dev diff --git a/bin/release.sh b/bin/release.sh index aa836ba3..49469a7f 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -19,6 +19,12 @@ done TAG_PREFIX=v PYPI_PACKAGE=archivebox +pypi_release_json() { + "$CURL_BINARY" -fsSL --retry 30 --retry-all-errors --retry-delay 2 --retry-max-time 60 \ + -H 'Cache-Control: no-cache, no-store, max-age=0' -H 'Pragma: no-cache' \ + "https://pypi.org/pypi/${PYPI_PACKAGE}/$1/json?cache_bust=$(date +%s)-${RANDOM}" +} + VERSION="$($UV_BINARY run --no-cache --no-project python - <<'PY' from pathlib import Path import json @@ -290,6 +296,7 @@ if [[ "$PYPI_STATE" != complete ]]; then done [[ "${#PYPI_ARTIFACTS[@]}" -gt 0 ]] $UV_BINARY publish --no-cache --trusted-publishing always "${PYPI_ARTIFACTS[@]}" + pypi_release_json "$VERSION" >/dev/null fi if [[ "$IS_RC" == true ]]; then