fix: macOS 打包步骤添加 notarization 重试(最多 3 次)

Apple notarization 服务偶发网络超时,加递增间隔重试(60s/120s)。
同时启用 DEBUG=electron-notarize* 方便排查 notarization 日志。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7418andClaude Sonnet 4.6 committed 2026-03-03 09:56:42 +08:00
1 parent c24dedcffe
commit f50a8879db
1 file changed
+13 -1
+13 -1
View File
@@ -99,7 +99,19 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: npx electron-builder --mac --config electron-builder.yml --publish never
DEBUG: electron-notarize*
run: |
set -euo pipefail
for i in 1 2 3; do
echo "electron-builder attempt $i/3"
if npx electron-builder --mac --config electron-builder.yml --publish never; then
exit 0
fi
if [ "$i" -lt 3 ]; then
sleep $((i * 60))
fi
done
exit 1
- name: Verify code signature
if: ${{ env.HAS_CERT == 'true' }}