-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathaction.yml
More file actions
31 lines (31 loc) · 1.13 KB
/
action.yml
File metadata and controls
31 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 'Composite Xcode Path'
description: 'Get Xcode version to be used across all actions'
inputs:
xcode-version:
description:
Xcode version to use, in semver(ish)-style matching the format on the Actions runner image.
See available versions at https://github.com/actions/runner-images/blame/main/images/macos/macos-14-Readme.md#xcode
required: false
default: '26.0'
outputs:
xcode-path:
description: "Path to current Xcode version"
value: ${{ steps.xcode-path.outputs.xcode-path }}
runs:
using: "composite"
steps:
- name: Set XCODE_PATH env var
env:
XCODE_PATH: "/Applications/Xcode_${{ inputs.xcode-version }}.app"
run: echo "XCODE_PATH=${{ env.XCODE_PATH }}" >> $GITHUB_ENV
shell: bash
- name: Set Xcode version
run: sudo xcode-select -s ${{ env.XCODE_PATH }}
shell: bash
- name: Enable new build system integration
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
shell: bash
- name: Output Xcode path
id: xcode-path
run: echo "xcode-path=$(echo ${{ env.XCODE_PATH }})" >> $GITHUB_OUTPUT
shell: bash