11name : Build Tauri Applications
22
3- # Multi-OS Tauri desktop bundle build matrix (Windows / macOS arm+intel /
3+ # Multi-OS Tauri desktop bundle build matrix (Windows / macOS universal /
44# Linux). Called from build.yml on PRs that touch desktop sources (gated
55# via the `tauri` filter in .github/config/.files.yaml). Also runnable
66# on demand via workflow_dispatch with a per-platform selector.
@@ -48,17 +48,16 @@ jobs:
4848 PLATFORM : ${{ inputs.platform }}
4949 run : |
5050 WINDOWS='{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"}'
51- MACOS_ARM='{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"}'
52- MACOS_INTEL='{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"}'
51+ MACOS='{"platform":"macos-15","args":"--target universal-apple-darwin","name":"macos-universal"}'
5352 LINUX='{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}'
5453
5554 # Resolve requested platform — populated by either workflow_dispatch
5655 # or workflow_call inputs; both paths default to "all".
5756 case "$PLATFORM" in
5857 windows) ENTRIES=("$WINDOWS") ;;
59- macos) ENTRIES=("$MACOS_ARM" "$MACOS_INTEL ") ;;
58+ macos) ENTRIES=("$MACOS ") ;;
6059 linux) ENTRIES=("$LINUX") ;;
61- *) ENTRIES=("$WINDOWS" "$MACOS_ARM" "$MACOS_INTEL " "$LINUX") ;;
60+ *) ENTRIES=("$WINDOWS" "$MACOS " "$LINUX") ;;
6261 esac
6362
6463 # Drop macOS entries when Apple certificate secret is unavailable
@@ -111,7 +110,23 @@ jobs:
111110 uses : dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
112111 with :
113112 toolchain : stable
114- targets : ${{ (matrix.platform == 'macos-15' || matrix.platform == 'macos-15-intel') && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
113+ targets : ${{ matrix.platform == 'macos-15' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
114+
115+ # x86_64 JDK is set up first so the aarch64 step below can leave its
116+ # JAVA_HOME as the active one. The macOS universal JRE build needs
117+ # jmods from both arches; the x64 path is captured into the env
118+ # before the second setup-java overwrites JAVA_HOME.
119+ - name : Set up x86_64 JDK 25 (macOS universal JRE)
120+ if : matrix.platform == 'macos-15'
121+ uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
122+ with :
123+ java-version : " 25"
124+ distribution : " temurin"
125+ architecture : " x64"
126+
127+ - name : Capture x86_64 JAVA_HOME
128+ if : matrix.platform == 'macos-15'
129+ run : echo "X64_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
115130
116131 - name : Set up JDK 25
117132 uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
@@ -126,6 +141,15 @@ jobs:
126141
127142 - name : Setup Task
128143 uses : go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
144+
145+ # Build the universal JRE before desktop:prepare so the jlink:runtime
146+ # task short-circuits on its `test -d runtime/jre` status check.
147+ - name : Build universal macOS JRE
148+ if : matrix.platform == 'macos-15'
149+ env :
150+ AARCH64_JAVA_HOME : ${{ env.JAVA_HOME }}
151+ run : task desktop:jlink:universal-mac
152+
129153 - name : Prepare desktop build
130154 run : task desktop:prepare
131155 env :
@@ -213,7 +237,7 @@ jobs:
213237 }
214238
215239 - name : Import Apple Developer Certificate
216- if : ( matrix.platform == 'macos-15' || matrix.platform == 'macos-15-intel') && env.APPLE_CERTIFICATE != ''
240+ if : matrix.platform == 'macos-15' && env.APPLE_CERTIFICATE != ''
217241 env :
218242 APPLE_CERTIFICATE : ${{ secrets.APPLE_CERTIFICATE }}
219243 APPLE_CERTIFICATE_PASSWORD : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
@@ -234,7 +258,7 @@ jobs:
234258 rm certificate.p12
235259
236260 - name : Verify Certificate
237- if : ( matrix.platform == 'macos-15' || matrix.platform == 'macos-15-intel') && env.APPLE_CERTIFICATE != ''
261+ if : matrix.platform == 'macos-15' && env.APPLE_CERTIFICATE != ''
238262 run : |
239263 echo "Verifying Apple Developer Certificate..."
240264 KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
@@ -246,7 +270,7 @@ jobs:
246270 echo "Certificate imported successfully."
247271
248272 - name : Check DMG creation dependencies (macOS only)
249- if : matrix.platform == 'macos-15' || matrix.platform == 'macos-15-intel'
273+ if : matrix.platform == 'macos-15'
250274 run : |
251275 echo "🔍 Checking DMG creation dependencies on ${{ matrix.platform }}..."
252276 echo "hdiutil version: $(hdiutil --version || echo 'NOT FOUND')"
@@ -373,7 +397,7 @@ jobs:
373397 fi
374398
375399 - name : Verify notarization (macOS only)
376- if : matrix.platform == 'macos-15' || matrix.platform == 'macos-15-intel'
400+ if : matrix.platform == 'macos-15'
377401 run : |
378402 echo "🔍 Verifying notarization status..."
379403 cd ./frontend/src-tauri/target
@@ -398,7 +422,7 @@ jobs:
398422 # Only ship the MSI installer. The loose exe and WiX toolset exes
399423 # are not the user-facing installer - the MSI contains the signed inner exe.
400424 find . -name "*.msi" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.msi" \;
401- elif [ "${{ matrix.platform }}" = "macos-15" ] || [ "${{ matrix.platform }}" = "macos-15-intel" ] ; then
425+ elif [ "${{ matrix.platform }}" = "macos-15" ]; then
402426 find . -name "*.dmg" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.dmg" \;
403427 else
404428 find . -name "*.deb" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.deb" \;
@@ -491,7 +515,7 @@ jobs:
491515 echo "❌ No Windows executable found"
492516 exit 1
493517 fi
494- elif [ "${{ matrix.platform }}" = "macos-15" ] || [ "${{ matrix.platform }}" = "macos-15-intel" ] ; then
518+ elif [ "${{ matrix.platform }}" = "macos-15" ]; then
495519 echo "Checking for macOS artifacts..."
496520 find . -name "*.dmg" | head -5
497521 if [ $(find . -name "*.dmg" | wc -l) -eq 0 ]; then
@@ -556,8 +580,7 @@ jobs:
556580 // Map of expected artifact names to display info
557581 const artifactMap = {
558582 'Stirling-PDF-windows-x86_64': { icon: '🪟', platform: 'Windows x64', files: '.exe, .msi' },
559- 'Stirling-PDF-macos-aarch64': { icon: '🍎', platform: 'macOS ARM64', files: '.dmg' },
560- 'Stirling-PDF-macos-x86_64': { icon: '🍎', platform: 'macOS Intel', files: '.dmg' },
583+ 'Stirling-PDF-macos-universal': { icon: '🍎', platform: 'macOS Universal', files: '.dmg' },
561584 'Stirling-PDF-linux-x86_64': { icon: '🐧', platform: 'Linux x64', files: '.deb, .rpm, .AppImage' }
562585 };
563586
0 commit comments