From 1d65c0efdc99b53d52bdc872a60e1b39f6a7f2e6 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Sun, 25 Jan 2026 16:57:27 -0800 Subject: [PATCH] Select Xcode dynamically on self-hosted runner --- .github/workflows/release.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e44c3cd9..dc36354f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,24 +12,34 @@ permissions: jobs: build-sign-notarize: runs-on: self-hosted - env: - DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer steps: - name: Checkout uses: actions/checkout@v4 with: submodules: recursive + - name: Select Xcode + run: | + set -euo pipefail + if [ -d "/Applications/Xcode.app/Contents/Developer" ]; then + echo "DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer" >> "$GITHUB_ENV" + else + XCODE_APP="$(ls -d /Applications/Xcode*.app 2>/dev/null | head -n 1 || true)" + if [ -n "$XCODE_APP" ]; then + echo "DEVELOPER_DIR=$XCODE_APP/Contents/Developer" >> "$GITHUB_ENV" + else + echo "No Xcode.app found under /Applications" >&2 + exit 1 + fi + fi + xcodebuild -version + xcrun --sdk macosx --show-sdk-path + - name: Install build deps run: | brew update brew install zig - - name: Verify Xcode - run: | - xcodebuild -version - xcrun --sdk macosx --show-sdk-path - - name: Build GhosttyKit.xcframework run: | cd ghostty