name: macOS app
permissions:
contents: read
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]
paths:
- "macos/**"
- "docs/agent-api/**"
- ".github/workflows/macos.yml"
concurrency:
group: macos-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
runner:
uses: zakuro-ai/zakuro-infra/.github/workflows/pick-runner.yml@main
permissions: { actions: read }
secrets: inherit
if: >-
github.event_name != 'pull_request' || (
github.event.pull_request.draft == false &&
(github.event.action != 'edited' || github.event.changes.base != null) &&
(github.base_ref == github.event.repository.default_branch || startsWith(github.base_ref, 'release/')))
macos:
needs: runner
runs-on: ${{ fromJSON(needs.runner.outputs.runner_macos) }}
timeout-minutes: 20
steps:
- name: Purge stale git URL rewrites (runner hygiene)
shell: bash
run: |
git config --global --remove-section 'url.ssh://git@github.com/zakuro-ai/' 2>/dev/null || true
git config --global --unset-all core.sshCommand 2>/dev/null || true
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Homebrew on PATH (LaunchAgent runners start with a minimal PATH)
run: |
for d in /opt/homebrew/bin /usr/local/bin; do [ -d "$d" ] && echo "$d" >> "$GITHUB_PATH"; done
- name: Tooling
run: |
command -v xcodegen >/dev/null || brew install xcodegen
xcodebuild -version
swift --version
- name: ZakuroAgentKit tests (swift test)
run: swift test --package-path macos/Packages/ZakuroAgentKit
- name: Generate the Xcode project
run: xcodegen generate --spec macos/project.yml
- name: Build app + widget (unsigned)
run: >-
xcodebuild build -project macos/Zakuro.xcodeproj -scheme Zakuro
-configuration Release -destination 'generic/platform=macOS'
-derivedDataPath macos/build CODE_SIGNING_ALLOWED=NO