Skip to content

Commit 9da9ca6

Browse files
authored
ci: add wait step for PyPI package availability in Docker release workflow (#7466)
This update introduces a new step in the release workflow to wait for the specified version of the marimo package to become available on PyPI. The step checks for the package's availability up to 30 attempts, with a 10-second interval between checks, ensuring that the release process only continues once the package is confirmed to be available.
1 parent d545d64 commit 9da9ca6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,34 @@ jobs:
132132
- name: ⬇️ Checkout repo
133133
uses: actions/checkout@v4
134134

135+
- name: ⏳ Wait for PyPI package availability
136+
run: |
137+
VERSION="${{ needs.publish_release.outputs.marimo_version }}"
138+
echo "Waiting for marimo version $VERSION to be available on PyPI..."
139+
140+
MAX_ATTEMPTS=30
141+
ATTEMPT=0
142+
SLEEP_TIME=10
143+
144+
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
145+
ATTEMPT=$((ATTEMPT + 1))
146+
echo "Attempt $ATTEMPT/$MAX_ATTEMPTS: Checking PyPI for version $VERSION..."
147+
148+
# Check if the version exists on PyPI
149+
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/marimo/$VERSION/json")
150+
151+
if [ "$HTTP_CODE" = "200" ]; then
152+
echo "✅ Version $VERSION is available on PyPI!"
153+
exit 0
154+
else
155+
echo "Version $VERSION not yet available (HTTP $HTTP_CODE). Waiting ${SLEEP_TIME}s..."
156+
sleep $SLEEP_TIME
157+
fi
158+
done
159+
160+
echo "❌ Timed out waiting for version $VERSION on PyPI after $((MAX_ATTEMPTS * SLEEP_TIME)) seconds"
161+
exit 1
162+
135163
- name: 🐋 Log in to the Container registry
136164
uses: docker/login-action@v3
137165
with:

0 commit comments

Comments
 (0)