From 83862bda9927dbe80a4913efac4af24d0a89c1a6 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Sat, 28 Feb 2026 20:41:07 -0800 Subject: [PATCH] Fix race condition: wait for Linux wheel in latest before macOS upload The macOS job could upload to the latest release before the Linux job recreated it, causing the macOS wheel to be lost. Now wait for the Linux wheel to appear in latest first. Made-with: Cursor --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1b765525..bb84f82c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -152,7 +152,9 @@ jobs: echo "Upload attempt $i failed, retrying in 15s..." sleep 15 done - until gh release view latest >/dev/null 2>&1; do sleep 5; done + # Wait for the Linux job to finish creating the latest release with its wheel + echo "Waiting for Linux wheel to appear in latest release..." + until gh release view latest --json assets --jq '.assets[].name' 2>/dev/null | grep -q linux; do sleep 10; done for i in 1 2 3 4 5; do gh release upload latest dist/*.whl --clobber && break echo "Upload attempt $i failed, retrying in 15s..."