Skip to content

Commit bbedb38

Browse files
authored
optional notarization step (#511)
* optional notarization step * use correct package * add optional keychain profile and log comment
1 parent 04eb914 commit bbedb38

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

utils/package-osx-bundles.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,22 @@ productbuild \
158158
"${PKG_SIGN_ARGS[@]}" \
159159
${MACOS_PKG_SNAME}-macOS.pkg
160160

161-
# xcrun notarytool submit build/*-macOS.pkg --keychain-profile "build-notary" --wait
162-
# xcrun notarytool log --keychain-profile "build-notary" 00000000-0000-0000-0000-000000000000
161+
if [ -n "${MACOS_NOTARIZATION_USER}" ] && [ -n "${MACOS_NOTARIZATION_PASS}" ] && [ -n "${MACOS_NOTARIZATION_TEAM}" ]; then
162+
# Notarize using credentials
163+
xcrun notarytool submit ${MACOS_PKG_SNAME}-macOS.pkg \
164+
--apple-id ${MACOS_NOTARIZATION_USER} \
165+
--password ${MACOS_NOTARIZATION_PASS} \
166+
--team-id ${MACOS_NOTARIZATION_TEAM} \
167+
--wait
168+
xcrun stapler staple ${MACOS_PKG_SNAME}-macOS.pkg
169+
elif [ -n "${MACOS_KEYCHAIN_PROFILE}" ]; then
170+
# Notarize using keychain profile
171+
xcrun notarytool submit ${MACOS_PKG_SNAME}-macOS.pkg \
172+
--keychain-profile ${MACOS_KEYCHAIN_PROFILE} \
173+
--wait
174+
xcrun stapler staple ${MACOS_PKG_SNAME}-macOS.pkg
175+
fi
176+
177+
# To get logs of your notarization note the notarization id (of the form `00000000-0000-0000-0000-000000000000`)
178+
# and use either your credentials or keychain profile:
179+
# xcrun notarytool log --keychain-profile ${MACOS_KEYCHAIN_PROFILE} ${NOTARIZATION_ID}

0 commit comments

Comments
 (0)