Points a macOS runner at a specific Xcode installation, so every later step in the job compiles against the version you named instead of the image default.
This is a StepSecurity maintained action: a secure drop-in replacement for
mobiledevops/xcode-select-version-action, with the same inputs and the same
behaviour.
jobs:
build:
runs-on: macos-15
steps:
- uses: actions/checkout@v7
- uses: step-security/xcode-select-version-action@v1
with:
xcode-select-version: "16.4"
- run: xcodebuild -version| Name | Required | Description |
|---|---|---|
xcode-select-version |
yes | Version of an Xcode already installed on the image |
There are no outputs. The action changes the runner's active developer directory, which subsequent steps pick up automatically.
Only versions already present on the runner image can be selected; this action
installs nothing. The version you pass has to match the image's own naming
exactly, because it resolves to /Applications/Xcode_<version>.app. That means
16.4 and 16.4.0 are different bundles, and only one of them exists.
Quote the value in YAML. Unquoted, 16.40 and 16.4 are both parsed as the
number 16.4, and a trailing zero you meant to keep disappears.
The available versions change as images are updated, so check the
runner images documentation
for the image you target rather than relying on a list here. The
xcodebuild -version step in the example above records what the job actually
used.
The step fails if the requested version is not installed, reporting
Xcode <version> not installed. It also fails if xcode-select itself refuses
the switch, in which case its own error is passed through.
MIT. See LICENSE.
