ci(macos): enable DMG AppleScript background on Gitea runners (#189) #208
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user