@@ -291,6 +291,139 @@ jobs:
291291 path : release/agentdesktop-*
292292 if-no-files-found : error
293293
294+ build-macos-installers :
295+ needs : setup
296+ runs-on : ${{ matrix.runner }}
297+ permissions :
298+ contents : read
299+ strategy :
300+ fail-fast : false
301+ matrix :
302+ include :
303+ - arch : amd64
304+ target : x86_64-apple-darwin
305+ runner : macos-15-intel
306+ - arch : arm64
307+ target : aarch64-apple-darwin
308+ runner : macos-26
309+ env :
310+ AGENTDESKTOP_VERSION : ${{ needs.setup.outputs.version }}
311+ steps :
312+ - name : Checkout
313+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
314+ with :
315+ persist-credentials : false
316+
317+ - name : Install Node
318+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
319+ with :
320+ node-version-file : frontend/.nvmrc
321+
322+ - name : Install Rust target
323+ uses : dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
324+ with :
325+ toolchain : " 1.97"
326+ targets : ${{ matrix.target }}
327+
328+ - name : Install frontend dependencies
329+ working-directory : frontend
330+ shell : bash
331+ run : |
332+ corepack enable
333+ pnpm install --frozen-lockfile
334+
335+ # Production signing placeholder: import the Developer ID Application and
336+ # Developer ID Installer certificates into a temporary keychain here.
337+ # Store the certificates and keychain password as GitHub Actions secrets.
338+ # - name: Import Apple signing certificates
339+ # shell: bash
340+ # env:
341+ # APPLE_APPLICATION_CERTIFICATE: ${{ secrets.APPLE_APPLICATION_CERTIFICATE }}
342+ # APPLE_INSTALLER_CERTIFICATE: ${{ secrets.APPLE_INSTALLER_CERTIFICATE }}
343+ # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
344+ # run: |
345+ # # Create a temporary keychain and import both certificates here.
346+
347+ - name : Build PKG
348+ working-directory : frontend
349+ shell : bash
350+ # Production signing placeholder: expose the imported identities to
351+ # Tauri and package-macos.mjs when certificate import is implemented.
352+ # env:
353+ # APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_APPLICATION_SIGNING_IDENTITY }}
354+ # APPLE_INSTALLER_SIGNING_IDENTITY: ${{ secrets.APPLE_INSTALLER_SIGNING_IDENTITY }}
355+ # APPLE_INSTALLER_KEYCHAIN: ${{ runner.temp }}/agentdesktop-signing.keychain-db
356+ run : pnpm --filter @agentdesktop/desktop-web dist:mac -- --target "${{ matrix.target }}"
357+
358+ - name : Stage PKG
359+ shell : bash
360+ env :
361+ TARGET : ${{ matrix.target }}
362+ ARCH : ${{ matrix.arch }}
363+ OUTPUT_NAME : agentdesktop-macos-${{ matrix.arch }}.pkg
364+ run : |
365+ source_path="target/${TARGET}/release/bundle/pkg/Agent Desktop_${AGENTDESKTOP_VERSION}_${ARCH}.pkg"
366+ test -f "${source_path}"
367+ mkdir -p release
368+ cp "${source_path}" "release/${OUTPUT_NAME}"
369+
370+ # Production notarization placeholder: notarize and staple the signed
371+ # package here, before calculating its checksum or smoke-testing it.
372+ # - name: Notarize and staple PKG
373+ # shell: bash
374+ # env:
375+ # OUTPUT_NAME: agentdesktop-macos-${{ matrix.arch }}.pkg
376+ # APPLE_ID: ${{ secrets.APPLE_ID }}
377+ # APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
378+ # APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
379+ # run: |
380+ # xcrun notarytool submit "release/${OUTPUT_NAME}" \
381+ # --apple-id "${APPLE_ID}" \
382+ # --password "${APPLE_APP_SPECIFIC_PASSWORD}" \
383+ # --team-id "${APPLE_TEAM_ID}" \
384+ # --wait
385+ # xcrun stapler staple "release/${OUTPUT_NAME}"
386+
387+ - name : Checksum PKG
388+ shell : bash
389+ env :
390+ OUTPUT_NAME : agentdesktop-macos-${{ matrix.arch }}.pkg
391+ run : |
392+ (cd release && shasum -a 256 "${OUTPUT_NAME}" > "${OUTPUT_NAME}.sha256")
393+
394+ - name : Smoke test PKG
395+ shell : bash
396+ env :
397+ OUTPUT_NAME : agentdesktop-macos-${{ matrix.arch }}.pkg
398+ run : |
399+ sudo installer -pkg "release/${OUTPUT_NAME}" -target /
400+ sudo launchctl print system/dev.agentdesktop.daemon > /dev/null
401+ deadline=$((SECONDS + 30))
402+ until sudo "/Applications/agentdesktop.app/Contents/MacOS/agentdesktop" status; do
403+ if (( SECONDS >= deadline )); then
404+ echo "Installed CLI could not reach the Agent Desktop daemon" >&2
405+ exit 1
406+ fi
407+ sleep 1
408+ done
409+
410+ - name : Remove smoke-test installation
411+ if : always()
412+ shell : bash
413+ run : |
414+ sudo launchctl bootout system/dev.agentdesktop.daemon || true
415+ sudo rm -f /Library/LaunchDaemons/dev.agentdesktop.daemon.plist
416+ sudo rm -rf "/Applications/agentdesktop.app"
417+ sudo rm -rf /etc/agentdesktop /var/lib/agentdesktop /var/run/agentdesktop
418+ sudo pkgutil --forget dev.agentdesktop.installer || true
419+
420+ - name : Upload unsigned PKG
421+ uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
422+ with :
423+ name : unsigned-macos-installer-${{ matrix.arch }}
424+ path : release/agentdesktop-macos-*
425+ if-no-files-found : error
426+
294427 build-windows-installers :
295428 needs : setup
296429 runs-on : ${{ matrix.runner }}
@@ -337,7 +470,7 @@ jobs:
337470 shell : bash
338471 run : pnpm --filter @agentdesktop/desktop-web dist:win -- --target "${{ matrix.target }}"
339472
340- - name : Stage MSI and checksum
473+ - name : Stage MSI
341474 shell : pwsh
342475 env :
343476 TARGET : ${{ matrix.target }}
@@ -349,6 +482,24 @@ jobs:
349482 }
350483 New-Item -ItemType Directory -Force release | Out-Null
351484 Copy-Item $installers[0].FullName "release/$env:OUTPUT_NAME"
485+
486+ # Production signing placeholder: sign the staged MSI here with the
487+ # selected Authenticode provider before checksumming or smoke-testing it.
488+ # - name: Sign MSI
489+ # shell: pwsh
490+ # env:
491+ # AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
492+ # AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
493+ # AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
494+ # OUTPUT_NAME: agentdesktop-windows-${{ matrix.arch }}.msi
495+ # run: |
496+ # # Invoke Azure Artifact Signing or signtool for release/$env:OUTPUT_NAME here.
497+
498+ - name : Checksum MSI
499+ shell : pwsh
500+ env :
501+ OUTPUT_NAME : agentdesktop-windows-${{ matrix.arch }}.msi
502+ run : |
352503 $hash = (Get-FileHash "release/$env:OUTPUT_NAME" -Algorithm SHA256).Hash.ToLowerInvariant()
353504 "$hash $env:OUTPUT_NAME" | Set-Content "release/$env:OUTPUT_NAME.sha256" -Encoding ascii
354505
@@ -397,6 +548,7 @@ jobs:
397548 - push-controller-image
398549 - push-helm-chart
399550 - build-binaries
551+ - build-macos-installers
400552 - build-windows-installers
401553 runs-on : ubuntu-24.04
402554 permissions :
0 commit comments