From 7e0b0b2530184b6f0ebc7e976e62ddb1046119f4 Mon Sep 17 00:00:00 2001 From: Joaquim Rocha Date: Wed, 14 Aug 2024 15:35:16 +0100 Subject: [PATCH] WIP Signed-off-by: Joaquim Rocha --- .github/workflows/app-artifacts-mac.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/app-artifacts-mac.yml b/.github/workflows/app-artifacts-mac.yml index 5128aab7404..62741d361f0 100644 --- a/.github/workflows/app-artifacts-mac.yml +++ b/.github/workflows/app-artifacts-mac.yml @@ -159,24 +159,35 @@ jobs: run: | cd ./dmgs - MOUNT_OUTPUT="$(hdiutil attach ./app/dist/Headlamp*${{ matrix.arch }}*.dmg)" + # Map x86 to x64 + ARCH=${{ matrix.arch }} + if [ "$ARCH" = "x86" ]; then + ARCH="x64" + fi + + echo "Verifying notarization of the app: $(ls ./Headlamp*${ARCH}*.dmg)" + MOUNT_OUTPUT="$(hdiutil attach ./Headlamp*${ARCH}*.dmg)" + echo "MOUNT_OUTPUT: $MOUNT_OUTPUT" VOLUME_NAME="$(echo "$MOUNT_OUTPUT" | grep -o '/Volumes/[^\s]*')" # Check if the app is notarized - spctl -a -v "$VOLUME_NAME/Contents/MacOS/Headlamp" + echo "CHECK VOL: $VOLUME_NAME" + spctl -a -v "$VOLUME_NAME/Headlamp.app/Contents/MacOS/Headlamp" + echo "CHECK SYMLINKS" # Check if the app has symlinks SYMLINKS=$(find "$VOLUME_NAME" -type l -ls | grep node_modules) + echo "CHECK SYMLINKS: $SYMLINKS" if [ -n "$SYMLINKS" ]; then echo "Symlinks found in the DMG:" echo "$SYMLINKS" exit 1 fi - hdiutil detach "$VOLUME_NAME" + hdiutil detach "$VOLUME_NAME" || true stapler: runs-on: macos-latest - needs: notarize + needs: verify-notarization permissions: actions: write # for downloading and uploading artifacts contents: read