Skip to content

Releases: maxim-lobanov/setup-xcode

Improve retrieving installed Xcode versions

15 Oct 06:19
dfa1339

Choose a tag to compare

Previously, we retrieved the version of Xcode from Xcode app name. Examples:

  • Xcode_12 -> 12.0.0
  • Xcode_12.2 -> 12.2.0
  • Xcode_12.2.1 -> 12.2.1

This way is not reliable enough because currently GitHub runners contain Xcode 12.0.1 on path Xcode_12.app and it is impossible to determine it. We shouldn't rely on app name.
Instead we can parse <XCODE_ROOT>/Contents/version.plist file and read version from it.

Add "latest-stable" keyword

27 Aug 15:53

Choose a tag to compare

setup-xcode

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 virtual-environments repository.

Available parameters

Argument Description Format
xcode-version Specify the Xcode version to use latest, latest-stable or any semver string

Examples: latest, latest-stable, 10, 11.4, 11.4.0, ^11.4.0
Note:

  • latest-stable points to the latest stable version of Xcode
  • latest includes beta releases that GitHub actions has installed.

Usage

Set the latest stable Xcode version:

jobs:
  build:
    runs-on: macos-latest
    steps:
    - uses: maxim-lobanov/setup-xcode@v1.1
      with:
        xcode-version: latest-stable

Set the latest Xcode version including beta releases:

jobs:
  build:
    runs-on: macos-latest
    steps:
    - uses: maxim-lobanov/setup-xcode@v1.1
      with:
        xcode-version: latest

Set the specific version of Xcode:

jobs:
  build:
    runs-on: macos-latest
    steps:
    - uses: maxim-lobanov/setup-xcode@v1.1
      with:
        xcode-version: 11.4

License

The scripts and documentation in this project are released under the MIT License

First implementation of action

01 May 11:00
6bb546d

Choose a tag to compare

setup-xcode

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 virtual-environments repository.

Available parameters

Argument Description Format
xcode-version Specify the Xcode version to use latest keyword or any semver string

Examples: latest, 10, 11.4, 11.4.0, ^11.4.0

Usage

name: CI
on: [push]
jobs:
  build:
    name: Set 
    runs-on: macos-latest
    steps:
    - name: setup-xcode
      uses: maxim-lobanov/setup-xcode@1.0
      with:
        xcode-version: 11.4 # set the latest available Xcode 11.4.*

    - name: setup-latest-xcode
      uses: maxim-lobanov/setup-xcode@1.0
      with:
        xcode-version: latest # set the latest available Xcode 11.4.*

License

The scripts and documentation in this project are released under the MIT License