From 4621d734ff9d454525235d04fbab2bb2b7ef816f Mon Sep 17 00:00:00 2001 From: Gronod Date: Sun, 6 Sep 2026 09:40:18 +0100 Subject: [PATCH] ci(macos): enable DMG AppleScript background on Gitea runners (#189) Port the GitHub runner fix (d51bae7) to .gitea/workflows/build-macos.yml: warm Finder/System Events before tauri build, and set TAURI_BUNDLER_DMG_IGNORE_CI=true so create-dmg does not skip AppleScript under CI=true. Tighten DMG/.app discovery to the release bundle paths. Closes #189 for the Gitea workflow. --- .gitea/workflows/build-macos.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-macos.yml b/.gitea/workflows/build-macos.yml index 05d1093..79ed3ff 100644 --- a/.gitea/workflows/build-macos.yml +++ b/.gitea/workflows/build-macos.yml @@ -84,7 +84,23 @@ jobs: echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV echo "PREFIX=ICCery_${TAG}-${SHORT_SHA}-macos-${{ matrix.platform.arch }}" >> $GITHUB_ENV + - name: Warm up macOS GUI for DMG layout + shell: bash + run: | + # Tauri's DMG bundler runs Finder AppleScript to set the background + # picture and icon positions. On CI Macs, Finder/Aqua may be idle, + # which causes AppleEvent timeouts (-1712). Wake them before build. + echo "WindowServer: $(pgrep -l WindowServer || echo 'NOT RUNNING')" + echo "console user: $(stat -f '%Su' /dev/console 2>/dev/null || echo unknown)" + echo "whoami: $(whoami)" + open -g -a Finder || true + open -g -a "System Events" || true + osascript -e 'tell application "Finder" to get name' || true + sleep 10 + - name: Build Tauri App + env: + TAURI_BUNDLER_DMG_IGNORE_CI: "true" run: npm run tauri build -- --target ${{ matrix.platform.target }} - name: Prepare Release Assets @@ -93,13 +109,13 @@ jobs: mkdir -p release-assets # Stage DMG package - DMG_FILE=$(find src-tauri/target -type f -name "*.dmg" | head -n 1) + DMG_FILE=$(find src-tauri/target -type f -path "*/release/bundle/dmg/*.dmg" | head -n 1) if [ -n "$DMG_FILE" ] && [ -f "$DMG_FILE" ]; then cp "$DMG_FILE" "release-assets/${PREFIX}.dmg" fi # Stage ZIP archive of .app bundle - APP_DIR=$(find src-tauri/target -type d -name "*.app" | head -n 1) + APP_DIR=$(find src-tauri/target -type d -path "*/release/bundle/macos/*.app" | head -n 1) if [ -n "$APP_DIR" ] && [ -d "$APP_DIR" ]; then APP_PARENT=$(dirname "$APP_DIR") APP_NAME=$(basename "$APP_DIR") -- 2.39.5