evOo-local/.github/workflows/desktop-macos-screenshot.yml
cynarAI a746783c48
ci: keep every job on internal runners without GitHub Actions storage (#192)
Runs used GitHub's artifact storage and cache service, which ran out of
the monthly included quota and blocked publishing. Caches and job
handoffs now stay on the self-hosted runner host, the desktop release
hands builds over through its draft release, and Windows waits for a
self-hosted runner instead of a GitHub-hosted one. A test enforces it.


Claude-Session: https://claude.ai/code/session_01R8L4XgqjAemFR2remB5hVY

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 07:44:16 +02:00

79 lines
3.6 KiB
YAML

# Infra-only: native macOS screenshots for PR review. Never add to branch protection.
# Skips cleanly on headless runners (no display). Artifact quota failures are soft.
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 (infra)
runs-on: [self-hosted, evoo-ci, macOS]
timeout-minutes: 20
steps:
- name: Detect interactive display
id: display
run: |
set -euo pipefail
if system_profiler SPDisplaysDataType 2>/dev/null | grep -q "Resolution:"; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "available=false" >> "$GITHUB_OUTPUT"
echo "::notice::No display attached on this macOS runner. Skipping infra screenshot; merge is not blocked."
fi
- uses: actions/checkout@v5
if: steps.display.outputs.available == 'true'
with:
persist-credentials: false
- uses: pnpm/action-setup@v4
if: steps.display.outputs.available == 'true'
- uses: actions/setup-node@v4
if: steps.display.outputs.available == 'true'
with:
node-version: 22
- run: pnpm install --frozen-lockfile
if: steps.display.outputs.available == 'true'
- run: pnpm --filter @rakazo/desktop build
if: steps.display.outputs.available == 'true'
- name: Verify packaged Tahoe icon and legacy fallback
if: steps.display.outputs.available == 'true'
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
if: steps.display.outputs.available == 'true'
continue-on-error: true
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"