GHA CI: Add code signing to fix app launch crash on macOS

PR #23016.
This commit is contained in:
Illustar0 2025-07-22 15:09:16 +08:00 committed by GitHub
commit bb1c02125b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -131,7 +131,15 @@ jobs:
pushd build pushd build
PACKAGE_RETRY=0 PACKAGE_RETRY=0
while [ "$PACKAGE_RETRY" -lt "3" ]; do while [ "$PACKAGE_RETRY" -lt "3" ]; do
macdeployqt "$appName.app" -dmg -no-strip macdeployqt "$appName.app" -no-strip
# sign
xattr -cr "$appName.app"
codesign --force --sign - --options runtime \
"$appName.app/Contents/Frameworks"/* \
"$appName.app/Contents/MacOS/$appName" \
"$appName.app"
codesign --verify --deep --strict -v "$appName.app"
hdiutil create -fs HFS+ -srcfolder "$appName.app" -volname "$appName" "$appName.dmg"
if [ -f "$appName.dmg" ]; then if [ -f "$appName.dmg" ]; then
break break
fi fi