-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
98 lines (92 loc) · 3.72 KB
/
action.yml
File metadata and controls
98 lines (92 loc) · 3.72 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: 'Xcode Simulator Setup'
author: 'Steffan Andrews'
description: 'Dynamically find the best available Xcode device simulator.'
inputs:
refresh:
description: 'Refresh Xcode simulators by first calling the simulator controller to refresh by listing all local simulators. This can help reduce the number of spurious issues that can occur periodically when listing and using simulators.'
required: false
default: true
download:
description: 'Asks the simulator controller to first download a relevant simulator for the platform specified by the target parameter. This can help reduce the number of spurious issues that can occur periodically when listing and using simulators.'
required: false
default: false
workspace-path:
description: 'Relative path to the Xcode workspace. If the target is a Swift Package that exists in the root of the repository, omit this parameter.'
required: false
scheme:
description: 'Xcode scheme name that will be used when enumerating available device simulators.'
required: true
target:
description: 'Platform (iOS, tvOS, watchOS, visionOS) device (iphone, ipad, watch, appletv, visionpro). See README for more options.'
required: true
os-version:
description: 'Platform OS version regular expression. (Optional)'
required: false
outputs:
id:
description: "Destination Simulator ID"
value: ${{ steps.id-finder.outputs.id }}
platform:
description: "Destination Platform"
value: ${{ steps.id-finder.outputs.platform }}
platform-short:
description: "Platform (Short)"
value: ${{ steps.id-finder.outputs.platform-short }}
workspace-path:
description: "Xcode workspace path relative to repo root"
value: ${{ steps.id-finder.outputs.workspace-path }}
runs:
using: "composite"
steps:
- name: Refresh Simulators
run: $GITHUB_ACTION_PATH/scripts/refresh.sh
shell: bash
if: inputs.refresh == 'true'
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
- name: Parse Inputs
id: parse-inputs
run: $GITHUB_ACTION_PATH/scripts/parse-inputs.sh
shell: bash
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
INPUT_WORKSPACEPATH: ${{ inputs.workspace-path }}
INPUT_SCHEME: ${{ inputs.scheme }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_OSVERSION: ${{ inputs.os-version }}
# outputs:
# parsed-workspace-path
# parsed-scheme
# parsed-platform
# parsed-platform-short
# parsed-platform-regex
# parsed-device-regex
# parsed-os-version-regex
- name: Download Simulator for Platform
run: $GITHUB_ACTION_PATH/scripts/download.sh
shell: bash
if: inputs.download == 'true'
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
SIMPLATFORM_SHORT: ${{ steps.parse-inputs.outputs.parsed-platform-short }}
- name: Find Simulator ID
id: id-finder
run: $GITHUB_ACTION_PATH/scripts/id.sh
shell: bash
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
WORKSPACEPATH: ${{ steps.parse-inputs.outputs.parsed-workspace-path }}
SCHEME: ${{ steps.parse-inputs.outputs.parsed-scheme }}
SIMPLATFORM: ${{ steps.parse-inputs.outputs.parsed-platform }}
SIMPLATFORM_SHORT: ${{ steps.parse-inputs.outputs.parsed-platform-short }}
SIMPLATFORM_REGEX: ${{ steps.parse-inputs.outputs.parsed-platform-regex }}
SIMDEVICE_REGEX: ${{ steps.parse-inputs.outputs.parsed-device-regex }}
OSVERSION_REGEX: ${{ steps.parse-inputs.outputs.parsed-os-version-regex }}
# outputs:
# id
# platform
# platform-short
# workspace-path
branding:
icon: 'code'
color: 'blue'