Staple macOS notarization (#3062)

This commit is contained in:
AltCode 2025-09-12 08:03:39 -05:00 committed by GitHub
parent 75253f050d
commit e5281d8b21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,12 +37,12 @@ cp -r $app_dir $dmg_dir/
hdiutil create $dmg_path -ov -volname ${app_name}Install -fs HFS+ -srcfolder $dmg_dir
if [ -n "$team_id" ]; then
codesign --verify --verbose=4 "${app_dir}"
codesign --sign="$identity" "$dmg_path"
if [ -n "$identity" ]; then
codesign --sign "$identity" "$dmg_path"
codesign --verify --verbose=4 "$dmg_path"
fi
if [ -n "$team_id" ]; then
xcrun notarytool submit \
--team-id "${team_id}" \
--apple-id "${apple_id}" \
@ -51,6 +51,8 @@ if [ -n "$team_id" ]; then
--wait \
"$dmg_path"
xcrun stapler staple "$dmg_path"
xcrun stapler staple "$app_dir"
spctl -a -t exec -vvv "$app_dir"
else
echo "[warning] skipping notarization. Please set ELIXIRKIT_NOTARY_{TEAM_ID,APPLE_ID,PASSWORD} environment variables"