Skip to content

Commit c24dedc

Browse files
7418claude
andcommitted
fix: CI 添加 notarization 凭证预校验步骤
在打包前用 xcrun notarytool history 验证 APPLE_ID / APP_SPECIFIC_PASSWORD / TEAM_ID 凭证组合是否有效,提前暴露凭证配置问题。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8749ada commit c24dedc

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ jobs:
7979
printf '%s' "$MAC_CERT_P12_BASE64" | tr -d '\r\n' | base64 --decode > /tmp/cert.p12
8080
openssl pkcs12 -in /tmp/cert.p12 -passin pass:"$MAC_CERT_PASSWORD" -noout
8181
82+
- name: Validate notarization credentials
83+
if: ${{ env.HAS_CERT == 'true' }}
84+
env:
85+
APPLE_ID: ${{ secrets.APPLE_ID }}
86+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
87+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
88+
run: |
89+
echo "APPLE_ID len=${#APPLE_ID}, TEAM=$APPLE_TEAM_ID, APP_PWD len=${#APPLE_APP_SPECIFIC_PASSWORD}"
90+
xcrun notarytool history \
91+
--apple-id "$APPLE_ID" \
92+
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
93+
--team-id "$APPLE_TEAM_ID" >/dev/null
94+
8295
- name: Package for macOS (x64 + arm64)
8396
env:
8497
CSC_LINK: ${{ env.HAS_CERT == 'true' && '/tmp/cert.p12' || '' }}

0 commit comments

Comments
 (0)