diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fe9c5cb7..32424cf6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -672,7 +672,16 @@ jobs: - name: Staple notarization ticket if: steps.signing.outputs.enabled == 'true' - run: xcrun stapler staple "${{ steps.dmg.outputs.dmg_path }}" + # Apple's ticket lookup drops the connection now and then (error 68); retry it. + run: | + for attempt in 1 2 3 4 5; do + xcrun stapler staple "${{ steps.dmg.outputs.dmg_path }}" && exit 0 + [ "$attempt" -eq 5 ] && break + echo "Staple attempt $attempt failed, retrying in 30 s" + sleep 30 + done + exit 1 + timeout-minutes: 10 - name: Validate stapled DMG if: steps.signing.outputs.enabled == 'true'