From dcfa51d8da1b5bbf7676accc86e7eef73c9fbef3 Mon Sep 17 00:00:00 2001 From: tkhwang Date: Sun, 18 Oct 2026 05:52:17 +0900 Subject: [PATCH] =?UTF-8?q?fix(ci):=20companion=20=EB=A6=B4=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=EC=9D=98=20staple=20=EB=8B=A8=EA=B3=84=EC=97=90=20?= =?UTF-8?q?=EC=9E=AC=EC=8B=9C=EB=8F=84=20=EC=B6=94=EA=B0=80=ED=95=98?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple 공증이 Accepted 된 직후 `xcrun stapler staple` 이 Apple CDN 연결 끊김(exit 68)으로 실패해 zip 업로드와 cask 갱신이 건너뛰어졌다 (workbranch-companion v2.31.0, v2.34.0). staple 을 30초 간격으로 최대 5번 시도한다. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/companion-release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/companion-release.yml b/.github/workflows/companion-release.yml index 566516d2..731ede38 100644 --- a/.github/workflows/companion-release.yml +++ b/.github/workflows/companion-release.yml @@ -105,7 +105,20 @@ jobs: --key-id "$APPLE_NOTARY_KEY_ID" \ --issuer "$APPLE_NOTARY_ISSUER_ID" \ --wait - xcrun stapler staple "$APP_BUNDLE_PATH" + # stapler fetches the ticket from Apple's CDN, which sometimes drops + # the connection (exit 68) right after notarization is accepted. + max_attempts=5 + for attempt in $(seq 1 "$max_attempts"); do + if xcrun stapler staple "$APP_BUNDLE_PATH"; then + break + fi + if [ "$attempt" -eq "$max_attempts" ]; then + echo "stapler failed after $max_attempts attempts" >&2 + exit 1 + fi + echo "stapler attempt $attempt failed; retrying in 30s" + sleep 30 + done ditto -c -k --keepParent "$APP_BUNDLE_PATH" "$ZIP_NAME" echo "APPLE_RELEASE_NOTARIZED=1" >> "$GITHUB_ENV"