使用特定版本的 Xcode 设置 GitHub Actions 工作流程
This action is intended to switch between pre-installed versions of Xcode for macOS images in GitHub Actions.
The list of all available versions can be found in runner-images repository.
| Argument | Description | Format |
|---|---|---|
xcode-version |
Specify the Xcode version to use | - latest or |
latest-stable or-beta |Notes:
latest-stable points to the latest stable version of Xcodelatest includes beta releases that GitHub actions has installed16, 16.4, 26.3, ^16.2.0 (find more examples in SemVer cheatsheet)-beta suffix after SemVer will only select among beta releases that GitHub actions has installed'12.0' to pass it as string because GitHub trimmes trailing .0 from numbersSet the latest stable Xcode version:
jobs:
build:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stableSet the latest Xcode version including beta releases:
jobs:
build:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latestSet the specific stable version of Xcode:
jobs:
build:
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.4'Set a specific Xcode version on macos-26:
jobs:
build:
runs-on: macos-26
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.3'The scripts and documentation in this project are released under the MIT License
暂无开放 Issues,或尚未同步最近议题。