From 46dee535a7e1c91d3fc96cd877b5fc3afb91851b Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Fri, 23 Oct 2026 17:35:23 +0100 Subject: [PATCH] Retry the DMG staple when Apple's ticket lookup drops the connection The staple step failed on first attempt in rc.28, rc.29, rc.30 and twice on v1.0.0 with NSURLErrorDomain -1005 from Apple's CloudKit ticket lookup, seconds after notarytool reported Accepted. Wrap it in the same five-attempt loop the validate step already uses. Closes #1176 Co-Authored-By: Claude Fable 5.1 --- .github/workflows/release-tauri.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-tauri.yml b/.github/workflows/release-tauri.yml index 6bb8fc4c..adbe8494 100644 --- a/.github/workflows/release-tauri.yml +++ b/.github/workflows/release-tauri.yml @@ -283,7 +283,17 @@ jobs: xcrun notarytool submit "$dmg_path" --key "$APPLE_API_KEY_PATH" \ --key-id "$APPLE_API_KEY" --issuer "$APPLE_API_ISSUER" \ --wait --timeout 20m - xcrun stapler staple "$dmg_path" + # Apple's ticket lookup drops connections now and then; retry before failing. + for attempt in 1 2 3 4 5; do + if xcrun stapler staple "$dmg_path"; then + break + fi + echo "stapler staple failed for ${dmg_path} (attempt ${attempt} of 5)" >&2 + if [[ "$attempt" -eq 5 ]]; then + exit 1 + fi + sleep 20 + done - name: Verify and stage macOS release shell: bash