Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,11 @@ jobs:
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait \
--timeout 30m 2>&1 | tee "$SUBMIT_LOG"
--timeout 120m 2>&1 | tee "$SUBMIT_LOG"

# notarytool exits 0 even for status: Invalid — surface the rejection
# and Apple's issue list instead of failing later at stapler with 65.
# notarytool exits 0 even for status: Invalid or a wait timeout —
# surface the failure (and Apple's issue list) instead of failing
# later at stapler with exit 65 / "Record not found".
if grep -q "status: Invalid" "$SUBMIT_LOG"; then
SUBMIT_ID=$(grep -oE 'id: [0-9a-f-]{36}' "$SUBMIT_LOG" | head -1 | awk '{print $2}')
echo "Notarization Invalid. Fetching Apple's issues for submission ${SUBMIT_ID:-<unknown>}..."
Expand All @@ -290,6 +291,19 @@ jobs:
exit 1
fi

if ! grep -q "status: Accepted" "$SUBMIT_LOG"; then
SUBMIT_ID=$(grep -oE 'id: [0-9a-f-]{36}' "$SUBMIT_LOG" | head -1 | awk '{print $2}')
echo "##[error]Notarization did not reach Accepted (timeout or unknown status). Submission: ${SUBMIT_ID:-<unknown>}"
if [ -n "$SUBMIT_ID" ]; then
echo "Polling the submission in case Apple finished after the wait window..."
xcrun notarytool info "$SUBMIT_ID" \
--apple-id "$APPLE_ID" \
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
--team-id "$APPLE_TEAM_ID" || true
fi
exit 1
fi

echo "Stapling notarization ticket to app..."
xcrun stapler staple "$APP_PATH"

Expand Down Expand Up @@ -323,7 +337,7 @@ jobs:
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait \
--timeout 30m
--timeout 120m

xcrun stapler staple "$DMG_FILE"
cp "$DMG_FILE" "$ARM64_DMG_FILE"
Expand Down
Loading