@@ -17,6 +17,9 @@ outputs:
17
17
destination :
18
18
description : " The destination associated with the given platform and Xcode version"
19
19
value : ${{ steps.get-destination.outputs.destination }}
20
+ device :
21
+ description : " The device name used in the destination"
22
+ value : ${{ steps.get-destination.outputs.device }}
20
23
sdk :
21
24
description : " The SDK associated with the given platform"
22
25
value : ${{ steps.get-sdk.outputs.sdk }}
@@ -38,23 +41,16 @@ runs:
38
41
39
42
- id : get-xcode-version
40
43
run : |
41
- LATEST_XCODE_VERSION=14.3.1
42
- MINIMUM_XCODE_VERSION_IOS_MAC=14.1.0
43
- MINIMUM_XCODE_VERSION_WATCH_TV=14.3.1
44
+ LATEST_XCODE_VERSION=15.3.0
45
+ MINIMUM_XCODE_VERSION=15.0.1
44
46
45
47
INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
46
48
47
49
case $INPUT_XCODE_VERSION in
48
50
latest)
49
51
XCODE_VERSION=$LATEST_XCODE_VERSION ;;
50
52
minimum)
51
- INPUT_PLATFORM=${{ inputs.platform }}
52
- case $INPUT_PLATFORM in
53
- iOS|macOS)
54
- XCODE_VERSION=$MINIMUM_XCODE_VERSION_IOS_MAC ;;
55
- tvOS|watchOS)
56
- XCODE_VERSION=$MINIMUM_XCODE_VERSION_WATCH_TV ;;
57
- esac ;;
53
+ XCODE_VERSION=$MINIMUM_XCODE_VERSION ;;
58
54
*)
59
55
XCODE_VERSION=$INPUT_XCODE_VERSION ;;
60
56
esac
@@ -68,23 +64,42 @@ runs:
68
64
INPUT_DESTINATION='${{ inputs.destination }}'
69
65
INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
70
66
71
- DESTINATION_MAPPING='{
72
- "minimum": {
73
- "iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.1",
74
- "tvOS": "platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1",
75
- "watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.1",
76
- "macOS": "platform=macOS,arch=x86_64"
77
- },
78
- "latest": {
79
- "iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.4",
80
- "tvOS": "platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4",
81
- "watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4",
82
- "macOS": "platform=macOS,arch=x86_64"
83
- }
84
- }'
67
+ case $INPUT_PLATFORM/$INPUT_XCODE_VERSION in
68
+ iOS/latest)
69
+ DEVICE="iPhone 15"
70
+ OS_VERSION="17.4"
71
+ ;;
72
+ iOS/*)
73
+ DEVICE="iPhone 14"
74
+ OS_VERSION="17.0.1"
75
+ ;;
76
+ tvOS/latest)
77
+ DEVICE="Apple TV 4K (3rd generation)"
78
+ OS_VERSION="17.4"
79
+ ;;
80
+ tvOS/*)
81
+ DEVICE="Apple TV 4K (3rd generation)"
82
+ OS_VERSION="17.0"
83
+ ;;
84
+ watchOS/latest)
85
+ DEVICE="Apple Watch Series 9 (45mm)"
86
+ OS_VERSION="10.4"
87
+ ;;
88
+ watchOS/*)
89
+ DEVICE="Apple Watch Series 8 (45mm)"
90
+ OS_VERSION="10.0"
91
+ ;;
92
+ esac
93
+
94
+ DESTINATION_MAPPING="{
95
+ \"iOS\": \"platform=iOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
96
+ \"tvOS\": \"platform=tvOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
97
+ \"watchOS\": \"platform=watchOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
98
+ \"macOS\": \"platform=macOS,arch=arm64\"
99
+ }"
85
100
86
101
if [ -z "$INPUT_DESTINATION" ]; then
87
- DESTINATION=$(echo $DESTINATION_MAPPING | jq -r ".\"$INPUT_XCODE_VERSION\". $INPUT_PLATFORM")
102
+ DESTINATION=$(echo $DESTINATION_MAPPING | jq -r ".$INPUT_PLATFORM")
88
103
else
89
104
DESTINATION=$INPUT_DESTINATION
90
105
fi
94
109
exit 1
95
110
fi
96
111
echo "destination=$DESTINATION" >> $GITHUB_OUTPUT
112
+ echo "device=$DEVICE" >> $GITHUB_OUTPUT
97
113
shell : bash
98
114
99
115
- id : get-sdk
0 commit comments