name: desktop-macos-screenshot on: push: branches: [main] paths: &desktop-setup-paths - ".github/workflows/desktop-macos-screenshot.yml" - "apps/desktop/e2e/setup.spec.ts" - "apps/desktop/package.json" - "apps/desktop/assets/**" - "packages/ui-tokens/assets/**" - "apps/desktop/scripts/copy-static.mjs" - "apps/desktop/src/setup*" - "apps/desktop/src/window-options.ts" - "packages/contracts/src/desktop.ts" pull_request: paths: *desktop-setup-paths permissions: contents: read concurrency: group: desktop-macos-screenshot-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: screenshot: name: macOS setup screenshot runs-on: [self-hosted, macOS, ARM64] timeout-minutes: 20 steps: - uses: actions/checkout@v5 with: persist-credentials: false - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm --filter @rakazo/desktop build - name: Verify packaged Tahoe icon and legacy fallback run: | pnpm --filter @rakazo/web build CSC_IDENTITY_AUTO_DISCOVERY=false pnpm --filter @rakazo/desktop exec electron-builder --mac --dir --publish never -c.mac.identity=null -c.mac.notarize=false xcrun assetutil --info apps/desktop/out/mac-arm64/Rakazo.app/Contents/Resources/Assets.car > "$RUNNER_TEMP/icon-assets.json" jq -e 'any(.[]; .Name == "Icon" and .AssetType == "IconImageStack") and any(.[]; .Name == "Icon_Assets/orange-bot" and .AssetType == "Image")' "$RUNNER_TEMP/icon-assets.json" iconutil -c iconset apps/desktop/out/mac-arm64/Rakazo.app/Contents/Resources/icon.icns -o "$RUNNER_TEMP/fallback.iconset" sips -s format png "$RUNNER_TEMP/fallback.iconset/icon_128x128@2x.png" --out "$RUNNER_TEMP/fallback-decoded.png" test -s "$RUNNER_TEMP/fallback-decoded.png" test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIconName' apps/desktop/out/mac-arm64/Rakazo.app/Contents/Info.plist)" = Icon env: RAKAZO_ALLOW_DEV_SECRETS: "1" - name: Capture packaged macOS setup window and Dock env: RAKAZO_E2E_EXECUTABLE: out/mac-arm64/Rakazo.app/Contents/MacOS/Rakazo run: >- pnpm --filter @rakazo/desktop exec playwright test --config e2e/playwright.config.ts setup.spec.ts --grep "first run asks whether to use a local or existing instance" - name: Upload native macOS setup screenshot if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: desktop-e2e-macos-screenshot path: | apps/desktop/e2e/screenshots/08-setup-macos-native-controls.png apps/desktop/e2e/screenshots/09-macos-dock.png if-no-files-found: warn retention-days: 1