diff --git a/.github/workflows/app-artifacts-mac.yml b/.github/workflows/app-artifacts-mac.yml index 5128aab7404..2086fb602dd 100644 --- a/.github/workflows/app-artifacts-mac.yml +++ b/.github/workflows/app-artifacts-mac.yml @@ -159,24 +159,39 @@ 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) - if [ -n "$SYMLINKS" ]; then + SYMLINKS=$(find "$VOLUME_NAME" -type l -ls || true) + NODE_MODULES_AS_SYMLINKS=$(echo "$SYMLINKS" | grep node_modules || true) + echo "CHECK SYMLINKS: $SYMLINKS $NODE_MODULES_AS_SYMLINKS" + if [ -n "$NODE_MODULES_AS_SYMLINKS" ]; then echo "Symlinks found in the DMG:" - echo "$SYMLINKS" + echo "$NODE_MODULES_AS_SYMLINKS" exit 1 + else + echo "No symlinks found in the DMG" fi - hdiutil detach "$VOLUME_NAME" + hdiutil detach "$VOLUME_NAME" || true + exit 0 stapler: runs-on: macos-latest - needs: notarize + needs: verify-notarization permissions: actions: write # for downloading and uploading artifacts contents: read