From 54b83fc819df3786c098550a3d08c40de1ebacf9 Mon Sep 17 00:00:00 2001 From: aboyko Date: Fri, 17 Nov 2023 16:06:36 -0500 Subject: [PATCH] GHA: Try to fail the build if notarization failed --- .github/scripts/notarize-osx-distro-file.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/scripts/notarize-osx-distro-file.sh b/.github/scripts/notarize-osx-distro-file.sh index b1d87c189..3a6eda897 100755 --- a/.github/scripts/notarize-osx-distro-file.sh +++ b/.github/scripts/notarize-osx-distro-file.sh @@ -10,5 +10,10 @@ cd $dir xcrun notarytool submit ./${dmg_filename} --keychain-profile $notarize_profile --wait echo "Staple and generate checksums for ${dmg_filename}" xcrun stapler staple $dmg_filename -shasum -a 256 $dmg_filename > ${dmg_filename}.sha256 -md5 $dmg_filename > ${dmg_filename}.md5 \ No newline at end of file +if [ $? -eq 0 ]; then + shasum -a 256 $dmg_filename > ${dmg_filename}.sha256 + md5 $dmg_filename > ${dmg_filename}.md5 +else + echo "Notarization failed" + exit 1 +fi