@@ -15,6 +15,7 @@ mkdir -p "$ALT_PROVISIONING_PROFILES_DIR"
1515APPLE_TEAM_ID=" 4399GN35BJ"
1616CODE_SIGN_IDENTITY=" Developer ID Application: Coder Technologies Inc (${APPLE_TEAM_ID} )"
1717
18+ # Extract the ID of each provisioning profile
1819APP_PROVISIONING_PROFILE_ID=$( get_uuid " $APP_PROF_PATH " )
1920EXT_PROVISIONING_PROFILE_ID=$( get_uuid " $EXT_PROF_PATH " )
2021PTP_SUFFIX=" -systemextension"
@@ -55,16 +56,22 @@ create-dmg \
5556 " $built_app_path " \
5657 ./
5758
59+ # Add dmg to build artifacts
5860dmg_path=" ./build/Coder Desktop.dmg"
5961mv ./Coder\ Desktop* .dmg " $dmg_path "
6062
63+ # Notarize
6164xcrun notarytool store-credentials " notarytool-credentials" \
6265 --apple-id " $APPLE_ID " \
6366 --team-id " $APPLE_TEAM_ID " \
6467 --password " $APPLE_ID_PASSWORD " \
6568 --keychain " $KEYCHAIN_PATH "
6669
67- # xcrun notarytool submit "$dmg_path" --keychain-profile "notarytool-credentials" --wait
70+ xcrun notarytool submit " $dmg_path " \
71+ --keychain-profile " notarytool-credentials" \
72+ --keychain " $KEYCHAIN_PATH " \
73+ --wait
6874
69- # xcrun stapler staple "$dmg_path"
70- # xcrun stapler staple "$app_path"
75+ # Staple the notarization to the app and dmg, so they work without internet
76+ xcrun stapler staple " $dmg_path "
77+ xcrun stapler staple " $app_path "
0 commit comments