Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# 临时验证 workflow —— 仅验证 macOS 签名+公证链路,不发版、不部署。
|
||||
# 触发:push 到 verify-macos-signing 分支。验证通过后连同本文件与分支一并删除。
|
||||
# host 模式 runner 以本机用户身份运行,把验证输出写到固定宿主路径,便于本地读取结果。
|
||||
name: Verify macOS Signing
|
||||
|
||||
on:
|
||||
@@ -13,10 +14,16 @@ jobs:
|
||||
env:
|
||||
PUB_HOSTED_URL: https://pub.flutter-io.cn
|
||||
FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn
|
||||
RESULT_FILE: /Users/wangjia/.cache/jiu-verify-result.txt
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Reset result file
|
||||
run: |
|
||||
mkdir -p /Users/wangjia/.cache
|
||||
echo "=== verify-macos-signing run @ $(date) ===" > "$RESULT_FILE"
|
||||
|
||||
- name: Provision (idempotent)
|
||||
run: sh scripts/ci/provision-mac.sh
|
||||
|
||||
@@ -27,18 +34,28 @@ jobs:
|
||||
APPSTORE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
|
||||
APPSTORE_API_ISSUER_ID: ${{ secrets.APPSTORE_API_ISSUER_ID }}
|
||||
APPSTORE_API_KEY_P8_BASE64: ${{ secrets.APPSTORE_API_KEY_P8_BASE64 }}
|
||||
run: sh scripts/ci/compile-macos.sh "client-v0.0.0"
|
||||
|
||||
- name: Assert signed + notarized + stapled
|
||||
run: |
|
||||
set -e
|
||||
set -o pipefail
|
||||
sh scripts/ci/compile-macos.sh "client-v0.0.0" 2>&1 | tee -a "$RESULT_FILE"
|
||||
|
||||
- name: Assert + persist proof
|
||||
if: always()
|
||||
run: |
|
||||
APP="client/build/macos/Build/Products/Release/jiu_client.app"
|
||||
echo "== codesign --verify =="
|
||||
codesign --verify --deep --strict --verbose=2 "$APP"
|
||||
echo "== codesign -dvvv (Authority/TeamID) =="
|
||||
codesign -dvvv "$APP" 2>&1 | grep -E "Authority|TeamIdentifier|flags|Timestamp" || true
|
||||
echo "== stapler validate =="
|
||||
xcrun stapler validate "$APP"
|
||||
echo "== spctl assessment(必须 Notarized Developer ID)=="
|
||||
spctl -a -vvv -t install "$APP"
|
||||
echo "== OK: signed + notarized + stapled =="
|
||||
{
|
||||
echo ""
|
||||
echo "=== ASSERT @ $(date) ==="
|
||||
if [ -d "$APP" ]; then
|
||||
echo "-- codesign --verify --"
|
||||
codesign --verify --deep --strict --verbose=2 "$APP" 2>&1 && echo "CODESIGN_VERIFY_OK" || echo "CODESIGN_VERIFY_FAILED"
|
||||
echo "-- codesign -dvvv (Authority/Team/flags) --"
|
||||
codesign -dvvv "$APP" 2>&1 | grep -E "Authority|TeamIdentifier|flags|Timestamp" || true
|
||||
echo "-- stapler validate --"
|
||||
xcrun stapler validate "$APP" 2>&1 && echo "STAPLE_OK" || echo "STAPLE_INVALID"
|
||||
echo "-- spctl assessment --"
|
||||
spctl -a -vvv -t install "$APP" 2>&1 && echo "SPCTL_ACCEPTED" || echo "SPCTL_REJECTED"
|
||||
else
|
||||
echo "APP_NOT_BUILT (compile/sign/notarize 步骤已失败,见上方日志)"
|
||||
fi
|
||||
echo "=== END @ $(date) ==="
|
||||
} >> "$RESULT_FILE" 2>&1
|
||||
|
||||
Reference in New Issue
Block a user