Skip to content

Commit 8749ada

Browse files
7418claude
andcommitted
fix: CI 证书解码去除换行 + openssl 预校验
printf + tr -d 去除 base64 中可能的 \r\n, openssl pkcs12 -noout 在签名前验证 .p12 格式和密码正确。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 261d17c commit 8749ada

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ jobs:
7474
if: ${{ env.HAS_CERT == 'true' }}
7575
env:
7676
MAC_CERT_P12_BASE64: ${{ secrets.MAC_CERT_P12_BASE64 }}
77-
run: echo "$MAC_CERT_P12_BASE64" | base64 --decode > /tmp/cert.p12
77+
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
78+
run: |
79+
printf '%s' "$MAC_CERT_P12_BASE64" | tr -d '\r\n' | base64 --decode > /tmp/cert.p12
80+
openssl pkcs12 -in /tmp/cert.p12 -passin pass:"$MAC_CERT_PASSWORD" -noout
7881
7982
- name: Package for macOS (x64 + arm64)
8083
env:

0 commit comments

Comments
 (0)