Skip to content

Commit 33cf6ab

Browse files
committed
Updated build.yml to latest iPhone script
1 parent 05bd969 commit 33cf6ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ jobs:
1717
- name: Install
1818
run: pod install
1919
- name: Build
20-
run: xcodebuild build-for-testing -workspace sf-geojson-ios.xcworkspace -scheme sf-geojson-ios -destination 'platform=iOS Simulator,OS=latest,name=iPhone 16'
20+
run: |
21+
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
22+
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
23+
echo "latest_iphone: $latest_iphone"
24+
xcodebuild build-for-testing -workspace sf-geojson-ios.xcworkspace -scheme sf-geojson-ios -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"

0 commit comments

Comments
 (0)