mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Retry macOS DMG creation on resource-busy failures
This commit is contained in:
parent
78fa10c6ba
commit
725602b5e5
1 changed files with 26 additions and 1 deletions
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
|
|
@ -267,7 +267,32 @@ jobs:
|
|||
codesign --force --deep --sign - Wowee.app
|
||||
|
||||
- name: Create DMG
|
||||
run: hdiutil create -volname Wowee -srcfolder Wowee.app -ov -format UDZO Wowee.dmg
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -f Wowee.dmg
|
||||
# CI runners can occasionally leave a mounted volume around; detach if present.
|
||||
if [ -d "/Volumes/Wowee" ]; then
|
||||
hdiutil detach "/Volumes/Wowee" -force || true
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
ok=0
|
||||
for attempt in 1 2 3 4 5; do
|
||||
if hdiutil create -volname Wowee -srcfolder Wowee.app -ov -format UDZO Wowee.dmg; then
|
||||
ok=1
|
||||
break
|
||||
fi
|
||||
echo "hdiutil create failed on attempt ${attempt}; retrying..."
|
||||
if [ -d "/Volumes/Wowee" ]; then
|
||||
hdiutil detach "/Volumes/Wowee" -force || true
|
||||
fi
|
||||
sleep 3
|
||||
done
|
||||
|
||||
if [ "$ok" -ne 1 ] || [ ! -f Wowee.dmg ]; then
|
||||
echo "Failed to create Wowee.dmg after retries."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload DMG
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue