diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index 1dbf10c7..d618fabf 100755 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -72,13 +72,12 @@ jobs: shopt -s nullglob wheels=(dist/archivebox-*.whl) [[ "${#wheels[@]}" -eq 1 ]] - smoke_env="$(mktemp -d)/.venv" - uv venv --python 3.13 "$smoke_env" - uv pip install --no-cache --python "$smoke_env" "${wheels[0]}" + uv sync --locked --no-cache --no-sources --no-dev --no-install-project + uv pip install --no-cache --no-deps --python .venv/bin/python "${wheels[0]}" unset PYTHONPATH cd "$(mktemp -d)" - VIRTUAL_ENV="$smoke_env" uv run --no-cache --active --no-project --no-sync python -c 'import archivebox' - VIRTUAL_ENV="$smoke_env" uv run --no-cache --active --no-project --no-sync archivebox version + VIRTUAL_ENV="$GITHUB_WORKSPACE/.venv" uv run --no-cache --active --no-project python -c 'import archivebox' + VIRTUAL_ENV="$GITHUB_WORKSPACE/.venv" uv run --no-cache --active --no-project archivebox version - name: Upload every distribution uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index ed0c10ee..08e0650d 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@afb379c6279fdeeca7aa4408d9589cd969b64ae7 + uses: ArchiveBox/monorepo/.github/actions/prepare-release-version@88995501da28f05fdac2df2fab235cd79cd92a3f with: package: archivebox branch: dev diff --git a/bin/release.sh b/bin/release.sh index 92926003..c8e99435 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -20,23 +20,11 @@ TAG_PREFIX=v PYPI_PACKAGE=archivebox pypi_release_json() { - "$CURL_BINARY" -fsSL --retry 30 --retry-all-errors --retry-delay 2 --retry-max-time 60 \ + "$CURL_BINARY" -fsSL \ -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}" } -pypi_wait_for_release() { - local version="$1" - pypi_release_json "${version}" >/dev/null - for _ in {1..30}; do - "$CURL_BINARY" -fsSL -H 'Cache-Control: no-cache, no-store, max-age=0' -H 'Pragma: no-cache' \ - "https://pypi.org/simple/${PYPI_PACKAGE}/?cache_bust=$(date +%s)-${RANDOM}" | \ - grep -Fq ">archivebox-${version}-py3-none-any.whl<" && return - sleep 2 - done - return 1 -} - VERSION="$($UV_BINARY run --no-cache --no-project python - <<'PY' from pathlib import Path import json @@ -133,7 +121,7 @@ if [[ -n "$TAG_TARGET" && "$TAG_TARGET" != "$RELEASE_SHA" ]]; then echo "Existing tag $TAG is not on $RELEASE_BRANCH" >&2 exit 1 } - PYPI_URLS="$($CURL_BINARY -fsSL "https://pypi.org/pypi/${PYPI_PACKAGE}/json" | $JQ_BINARY -c --arg version "$VERSION" ".releases[\$version] // []")" + PYPI_URLS="$(pypi_release_json "$VERSION" | $JQ_BINARY -c '.urls')" PYPI_URLS="$PYPI_URLS" VERSION="$VERSION" $UV_BINARY run --no-cache --no-project python - <<'PY' import json import os @@ -241,7 +229,7 @@ SDISTS=("$RELEASE_DISTRIBUTIONS_DIR"/archivebox-*.tar.gz) exit 1 } -PYPI_URLS="$($CURL_BINARY -fsSL "https://pypi.org/pypi/${PYPI_PACKAGE}/json" | $JQ_BINARY -c --arg version "$VERSION" ".releases[\$version] // []")" +PYPI_URLS="$(pypi_release_json "$VERSION" | $JQ_BINARY -c '.urls')" || PYPI_URLS='[]' PYPI_STATUS_OUTPUT="$(PYPI_URLS="$PYPI_URLS" RELEASE_DISTRIBUTIONS_DIR="$RELEASE_DISTRIBUTIONS_DIR" VERSION="$VERSION" $UV_BINARY run --no-cache --no-project python - <<'PY' import json import os @@ -308,7 +296,6 @@ if [[ "$PYPI_STATE" != complete ]]; then done [[ "${#PYPI_ARTIFACTS[@]}" -gt 0 ]] $UV_BINARY publish --no-cache --trusted-publishing always "${PYPI_ARTIFACTS[@]}" - pypi_wait_for_release "$VERSION" fi if [[ "$IS_RC" == true ]]; then