Skip to content

Commit b9c5abd

Browse files
latest xcode select
1 parent 8c40bca commit b9c5abd

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

.github/workflows/validate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
- uses: ./ # RageAgainstThePixel/unity-xcode-builder
101101
id: xcode-build
102102
with:
103+
xcode-version: 'latest'
103104
project-path: ${{ env.UNITY_PROJECT_PATH }}/Builds/${{ matrix.build-target }}/**/*.xcodeproj
104105
app-store-connect-key: ${{ secrets.APP_STORE_CONNECT_KEY }}
105106
app-store-connect-key-id: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}

dist/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60679,8 +60679,13 @@ const main = async () => {
6067960679
core.saveState('isPost', true);
6068060680
let xcodeVersionString = core.getInput('xcode-version');
6068160681
if (xcodeVersionString) {
60682-
core.info(`Setting xcode version to ${xcodeVersionString}`);
60683-
await exec.exec('xcodes', ['select', xcodeVersionString]);
60682+
if (xcodeVersionString.includes('latest')) {
60683+
await exec.exec('xcodes', ['install', '--latest', '--select']);
60684+
}
60685+
else {
60686+
core.info(`Setting xcode version to ${xcodeVersionString}`);
60687+
await exec.exec('xcodes', ['select', xcodeVersionString]);
60688+
}
6068460689
}
6068560690
let xcodeVersionOutput = '';
6068660691
await exec.exec('xcodebuild', ['-version'], {

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ const main = async () => {
2121
core.saveState('isPost', true);
2222
let xcodeVersionString = core.getInput('xcode-version');
2323
if (xcodeVersionString) {
24-
core.info(`Setting xcode version to ${xcodeVersionString}`);
25-
await exec.exec('xcodes', ['select', xcodeVersionString]);
24+
if (xcodeVersionString.includes('latest')) {
25+
await exec.exec('xcodes', ['install', '--latest', '--select']);
26+
} else {
27+
core.info(`Setting xcode version to ${xcodeVersionString}`);
28+
await exec.exec('xcodes', ['select', xcodeVersionString]);
29+
}
2630
}
2731
let xcodeVersionOutput = '';
2832
await exec.exec('xcodebuild', ['-version'], {

0 commit comments

Comments
 (0)