File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555
5656 release-macos :
5757 needs : [check, prepare-release]
58- runs-on : macos-latest
58+ # macos-latest 已切换到 macOS 26;无界面 runner 写入自签名证书信任时会阻塞。
59+ # 固定到此前验证可用的 macOS 15,避免基础镜像升级悄悄改变签名行为。
60+ runs-on : macos-15
61+ timeout-minutes : 60
5962 strategy :
6063 fail-fast : false
6164 matrix :
Original file line number Diff line number Diff line change @@ -14,14 +14,21 @@ CERT_PATH="$RUNNER_TEMP/sbox-signing.crt"
1414
1515printf ' %s' " $APPLE_CERTIFICATE " | base64 -D > " $P12_PATH "
1616
17+ echo " 正在创建临时签名钥匙串..."
1718security create-keychain -p " $KEYCHAIN_PASSWORD " " $KEYCHAIN_PATH "
1819security set-keychain-settings -lut 21600 " $KEYCHAIN_PATH "
1920security unlock-keychain -p " $KEYCHAIN_PASSWORD " " $KEYCHAIN_PATH "
21+
22+ echo " 正在导入签名身份..."
2023security import " $P12_PATH " -k " $KEYCHAIN_PATH " \
2124 -P " $APPLE_CERTIFICATE_PASSWORD " -T /usr/bin/codesign
2225# 从已导入的钥匙串读取证书,避免 OpenSSL 3 拒绝旧 P12 中的 RC2 加密。
2326security find-certificate -c " $IDENTITY " -p " $KEYCHAIN_PATH " > " $CERT_PATH "
27+
28+ echo " 正在信任自签名证书..."
2429security add-trusted-cert -r trustRoot -p codeSign -k " $KEYCHAIN_PATH " " $CERT_PATH "
30+
31+ echo " 正在授权 codesign 访问私钥..."
2532security set-key-partition-list -S apple-tool:,apple:,codesign: \
2633 -s -k " $KEYCHAIN_PASSWORD " " $KEYCHAIN_PATH "
2734
You can’t perform that action at this time.
0 commit comments