Skip to content

LucaTools/select-xcode

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

select-xcode

A GitHub Actions composite action that selects a specific Xcode version on macOS runners via xcode-select.

GitHub Marketplace

This action is also published on the GitHub Actions Marketplace.

Version resolution order

The action resolves the Xcode version using the following priority:

  1. xcode-version input — explicit version passed to the action
  2. .xcode-version file — a file at the root of the repository containing the version string
  3. XCODE_VERSION environment variable — a variable already set in the workflow environment

If none of the above provides a version, the action fails with a descriptive error message.

Usage

With an explicit version input

- uses: LucaTools/select-xcode@main
  with:
    xcode-version: "26.2"

With a .xcode-version file

Commit a .xcode-version file to the root of your repository:

26.2

Then use the action without any input:

- uses: LucaTools/select-xcode@main

With a pre-set environment variable

env:
  XCODE_VERSION: "26.2"

steps:
  - uses: LucaTools/select-xcode@main

Inputs

Name Required Default Description
xcode-version No "" The version of Xcode to select.

Full workflow example

name: CI

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - uses: LucaTools/select-xcode@main
        with:
          xcode-version: "26.2"

      - name: Build
        run: xcodebuild build -scheme MyApp

Requirements

  • Must run on a macOS runner (e.g. macos-latest, macos-26).
  • The requested Xcode version must be available at /Applications/Xcode_<version>.app.

License

MIT

About

GitHub action to select Xcode version via 1. explicit input 2. .xcode-version file 3. env var

Resources

License

Stars

Watchers

Forks

Contributors