diff --git a/.github/workflows/ocr-review.yml b/.github/workflows/ocr-review.yml index c9d0817..f79c0e2 100644 --- a/.github/workflows/ocr-review.yml +++ b/.github/workflows/ocr-review.yml @@ -37,3 +37,8 @@ jobs: # GLM 关闭思考输出(上游 action 默认格式) llm_extra_body: '{"thinking": {"type": "disabled"}}' language: Chinese + # z.ai 免费档并发上限很低:默认无限并发时全部审查项都会 rate_limited。 + # 收敛到 2 串行化 LLM 调用;预算与 effort 与生产验证过的配置一致。 + review_concurrency: 2 + max_tokens_budget: '2000000' + effort: medium diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df4745c..4a4efff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -304,8 +304,25 @@ jobs: exit 1 fi + # stapler downloads the ticket from Apple's CloudKit, which can drop + # the connection transiently (-1005) — retry before giving up. + staple_with_retry() { + local target="$1" + for attempt in 1 2 3 4 5; do + if xcrun stapler staple "$target"; then + return 0 + fi + echo "staple attempt $attempt for $target failed, retrying in 10s..." + sleep 10 + done + return 1 + } + echo "Stapling notarization ticket to app..." - xcrun stapler staple "$APP_PATH" + if ! staple_with_retry "$APP_PATH"; then + echo "##[error]stapler staple failed for app after 5 attempts" + exit 1 + fi echo "Verifying notarization..." xcrun stapler validate "$APP_PATH" @@ -339,7 +356,10 @@ jobs: --wait \ --timeout 120m - xcrun stapler staple "$DMG_FILE" + if ! staple_with_retry "$DMG_FILE"; then + echo "##[error]stapler staple failed for DMG after 5 attempts" + exit 1 + fi cp "$DMG_FILE" "$ARM64_DMG_FILE" rm -rf dmg_temp