ci(release): retry .dmg creation on transient hdiutil failure
hdiutil create intermittently fails with "Resource busy" on the hosted macOS runner (stale mount / background indexer), failing an otherwise successful build. Detach any leftover volume and retry up to five times before giving up, then assert the image exists. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
71837895b0
commit
9c7dd2fa6b
1 changed files with 17 additions and 5 deletions
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
|
@ -238,11 +238,23 @@ jobs:
|
|||
|
||||
- name: Create .dmg
|
||||
run: |
|
||||
hdiutil create \
|
||||
-volname "Open CAD Studio" \
|
||||
-srcfolder OpenCADStudio.app \
|
||||
-ov -format UDZO \
|
||||
OpenCADStudio.dmg
|
||||
# hdiutil intermittently fails with "Resource busy" on the hosted
|
||||
# runner (a stale mount or background indexer holding the image).
|
||||
# Detach any leftover volume and retry a few times before giving up.
|
||||
set +e
|
||||
for attempt in 1 2 3 4 5; do
|
||||
hdiutil detach "/Volumes/Open CAD Studio" >/dev/null 2>&1 || true
|
||||
rm -f OpenCADStudio.dmg
|
||||
hdiutil create \
|
||||
-volname "Open CAD Studio" \
|
||||
-srcfolder OpenCADStudio.app \
|
||||
-ov -format UDZO \
|
||||
OpenCADStudio.dmg && break
|
||||
echo "hdiutil create failed (attempt $attempt) — retrying in 5s"
|
||||
sleep 5
|
||||
done
|
||||
set -e
|
||||
test -f OpenCADStudio.dmg
|
||||
|
||||
- name: Upload .dmg to release
|
||||
if: github.event_name == 'release'
|
||||
|
|
|
|||
Loading…
Reference in a new issue