Skip to content

Commit 83862bd

Browse files
committed
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
1 parent d62702b commit 83862bd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ jobs:
152152
echo "Upload attempt $i failed, retrying in 15s..."
153153
sleep 15
154154
done
155-
until gh release view latest >/dev/null 2>&1; do sleep 5; done
155+
# Wait for the Linux job to finish creating the latest release with its wheel
156+
echo "Waiting for Linux wheel to appear in latest release..."
157+
until gh release view latest --json assets --jq '.assets[].name' 2>/dev/null | grep -q linux; do sleep 10; done
156158
for i in 1 2 3 4 5; do
157159
gh release upload latest dist/*.whl --clobber && break
158160
echo "Upload attempt $i failed, retrying in 15s..."

0 commit comments

Comments
 (0)