@@ -157,8 +157,11 @@ jobs:
157157 exit 0
158158 fi
159159
160+ # Set paths for app and DMG files
160161 APP_PATH="src-tauri/target/release/bundle/macos/gptme-tauri.app"
161- DMG_PATH="src-tauri/target/release/bundle/dmg/gptme-tauri_${{ matrix.arch }}.dmg"
162+ DMG_DIR="src-tauri/target/release/bundle/dmg"
163+ DMG_PATH="$DMG_DIR/gptme-tauri_${{ matrix.arch }}.dmg"
164+ mkdir -p "$DMG_DIR"
162165
163166 echo "Signing app bundle at $APP_PATH"
164167 # Sign app bundle with deep signing
@@ -168,18 +171,23 @@ jobs:
168171 codesign --verify --verbose "$APP_PATH"
169172
170173 echo "Creating DMG file"
171- # Create DMG using create-dmg tool
172- npm install -g create-dmg
173- create-dmg \
174- --volname "gptme-tauri" \
175- --volicon "src-tauri/icons/icon.icns" \
176- --window-pos 200 120 \
177- --window-size 600 300 \
178- --icon "gptme-tauri.app" 125 150 \
179- --app-drop-link 425 150 \
180- --codesign "$APPLE_SIGNING_IDENTITY" \
181- "$DMG_PATH" \
182- "$APP_PATH"
174+ # Create a directory for the DMG contents
175+ mkdir -p dmg-contents
176+
177+ # Copy the app to a temporary location
178+ cp -r "$APP_PATH" dmg-contents/
179+
180+ # Create a symlink to Applications folder
181+ ln -s /Applications dmg-contents/
182+
183+ # Create the DMG using native hdiutil (more reliable than third-party tools)
184+ hdiutil create -volname "gptme-tauri" \
185+ -srcfolder dmg-contents \
186+ -ov -format UDZO \
187+ "$DMG_PATH"
188+
189+ # Clean up temporary directory
190+ rm -rf dmg-contents
183191
184192 echo "Signing DMG file"
185193 codesign --force -s "$APPLE_SIGNING_IDENTITY" --keychain build.keychain "$DMG_PATH"
@@ -198,7 +206,8 @@ jobs:
198206 exit 0
199207 fi
200208
201- DMG_PATH="src-tauri/target/release/bundle/dmg/gptme-tauri_${{ matrix.arch }}.dmg"
209+ # Use the same DMG path as defined in the sign step
210+ echo "Using DMG path for notarization: $DMG_PATH"
202211
203212 echo "Uploading DMG for notarization"
204213 xcrun notarytool submit "$DMG_PATH" \
0 commit comments