|
57 | 57 | - name: Install macOS dependencies |
58 | 58 | if: matrix.os == 'macos-latest' |
59 | 59 | run: | |
60 | | - # No additional dependencies needed for macOS |
| 60 | + brew install create-dmg |
61 | 61 |
|
62 | 62 | # Import signing certificate (macOS only) |
63 | 63 | - name: Import Code Signing Certificate |
@@ -152,17 +152,20 @@ jobs: |
152 | 152 | # Verify signature |
153 | 153 | codesign -dv --verbose=4 "build/bin/${APP_NAME}" |
154 | 154 |
|
155 | | - # Create DMG |
156 | | - hdiutil create -volname "TinySystems" \ |
157 | | - -srcfolder "build/bin/${APP_NAME}" \ |
158 | | - -ov -format UDZO \ |
159 | | - "build/bin/${{ matrix.output }}" |
160 | | -
|
161 | | - # Sign the DMG |
162 | | - codesign --force \ |
163 | | - --sign "Developer ID Application: Tiny Systems Limited (74JHK2JWS7)" \ |
164 | | - --timestamp \ |
165 | | - "build/bin/${{ matrix.output }}" |
| 155 | + # Create DMG with drag-to-Applications layout |
| 156 | + # create-dmg exits 2 if it can't set custom volume icon (non-fatal) |
| 157 | + create-dmg \ |
| 158 | + --volname "Tiny Systems" \ |
| 159 | + --background "build/darwin/dmg-background.png" \ |
| 160 | + --window-pos 200 120 \ |
| 161 | + --window-size 640 480 \ |
| 162 | + --icon-size 80 \ |
| 163 | + --icon "tinysystems.app" 180 240 \ |
| 164 | + --app-drop-link 460 240 \ |
| 165 | + --codesign "Developer ID Application: Tiny Systems Limited (74JHK2JWS7)" \ |
| 166 | + "build/bin/${{ matrix.output }}" \ |
| 167 | + "build/bin/${APP_NAME}" \ |
| 168 | + || test $? -eq 2 |
166 | 169 |
|
167 | 170 | # Notarize the DMG (two-phase: submit, then poll until done) |
168 | 171 | if [ -n "$APPLE_ID" ] && [ -n "$APPLE_APP_PASSWORD" ] && [ -n "$APPLE_TEAM_ID" ]; then |
@@ -223,10 +226,18 @@ jobs: |
223 | 226 | --entitlements build/darwin/entitlements.plist \ |
224 | 227 | "build/bin/${APP_NAME}" |
225 | 228 |
|
226 | | - hdiutil create -volname "TinySystems" \ |
227 | | - -srcfolder "build/bin/${APP_NAME}" \ |
228 | | - -ov -format UDZO \ |
229 | | - "build/bin/${{ matrix.output }}" |
| 229 | + create-dmg \ |
| 230 | + --volname "Tiny Systems" \ |
| 231 | + --background "build/darwin/dmg-background.png" \ |
| 232 | + --window-pos 200 120 \ |
| 233 | + --window-size 640 480 \ |
| 234 | + --icon-size 80 \ |
| 235 | + --icon "tinysystems.app" 180 240 \ |
| 236 | + --app-drop-link 460 240 \ |
| 237 | + --no-internet-enable \ |
| 238 | + "build/bin/${{ matrix.output }}" \ |
| 239 | + "build/bin/${APP_NAME}" \ |
| 240 | + || test $? -eq 2 |
230 | 241 | fi |
231 | 242 |
|
232 | 243 | ls -la build/bin/ |
|
0 commit comments