Skip to content

Commit 6b1c373

Browse files
committed
Updated Workflow
1 parent 507ffb1 commit 6b1c373

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/build-ipa.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ jobs:
3636

3737
- name: Select Xcode Version
3838
run: |
39-
# Use the latest Xcode that was just installed
40-
LATEST_XCODE=$(find /Applications -name "Xcode*.app" | sort -V | tail -1)
39+
# Use the latest Xcode that was just installed, but exclude helper apps
40+
LATEST_XCODE=$(find /Applications -maxdepth 1 -name "Xcode*.app" -not -path "*/Xcode Helper.app" | sort -V | tail -1)
4141
echo "Using Xcode: $LATEST_XCODE"
42-
sudo xcode-select -switch "$LATEST_XCODE/Contents/Developer"
42+
if [ -z "$LATEST_XCODE" ]; then
43+
echo "No Xcode found, using default"
44+
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
45+
else
46+
sudo xcode-select -switch "$LATEST_XCODE/Contents/Developer"
47+
fi
4348
4449
- name: Show Xcode Version
4550
run: |

0 commit comments

Comments
 (0)