From 4c2d6e271752127f96931874fd6da710a68f3daa Mon Sep 17 00:00:00 2001 From: EtienneLescot Date: Thu, 29 Oct 2026 14:20:14 +0100 Subject: [PATCH 1/2] ci: retry stapling the macOS DMG when Apple drops the connection --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fe9c5cb7..3468db39e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -672,7 +672,15 @@ 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 + 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' From 714e873a867786d819c6dee9ba17dbe5ae3e3c8e Mon Sep 17 00:00:00 2001 From: EtienneLescot Date: Thu, 29 Oct 2026 14:29:08 +0100 Subject: [PATCH 2/2] ci: don't sleep after the last staple attempt --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3468db39e..32424cf6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -676,6 +676,7 @@ jobs: 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