From 53dc419e067ec58bf0514542a60fd7504e07ba67 Mon Sep 17 00:00:00 2001 From: Peter Jausovec Date: Fri, 23 Oct 2026 15:38:41 -0500 Subject: [PATCH] retry stapling failures Signed-off-by: Peter Jausovec --- .github/workflows/release-macos.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index 6060303..e5f96a9 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -207,7 +207,18 @@ jobs: APPLE_API_ISSUER: ${{ vars.APPLE_API_ISSUER }} run: | bash .github/scripts/notarize-macos.sh "release/${OUTPUT_NAME}" - xcrun stapler staple "release/${OUTPUT_NAME}" + # Ticket lookup via CloudKit fails transiently; retry stapling without resubmitting. + for attempt in 1 2 3 4 5; do + if xcrun stapler staple "release/${OUTPUT_NAME}"; then + break + fi + if (( attempt == 5 )); then + echo "Stapling failed after ${attempt} attempts" >&2 + exit 1 + fi + sleep $((attempt * 15)) + done + xcrun stapler validate "release/${OUTPUT_NAME}" - name: Checksum PKG shell: bash