Skip to content

Commit 9d790ca

Browse files
committed
ci: retry validating the stapled macOS DMG when Apple drops the connection
1 parent f3db068 commit 9d790ca

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎.github/workflows/build.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,16 @@ jobs:
685685

686686
- name: Validate stapled DMG
687687
if: steps.signing.outputs.enabled == 'true'
688+
# validate queries Apple too and fails the same way (error 68); retry it like staple.
688689
run: |
689-
xcrun stapler validate "${{ steps.dmg.outputs.dmg_path }}"
690+
for attempt in 1 2 3 4 5; do
691+
xcrun stapler validate "${{ steps.dmg.outputs.dmg_path }}" && break
692+
[ "$attempt" -eq 5 ] && exit 1
693+
echo "Validate attempt $attempt failed, retrying in 30 s"
694+
sleep 30
695+
done
690696
spctl -a -vv -t install "${{ steps.dmg.outputs.dmg_path }}"
697+
timeout-minutes: 10
691698

692699
- name: Upload macOS DMG
693700
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)