1
- name : " iOS Screenshots Workflow"
1
+ name : " iPhone Screenshots Workflow"
2
2
3
3
inputs :
4
4
IPHONE_DEVICE_MODEL :
5
5
description : ' Model of the iPhone device to be used when running tests'
6
6
required : false
7
7
default : iPhone 16 Pro Max
8
- IPAD_DEVICE_MODEL :
9
- description : ' Model of the iPad device to be used when running tests'
10
- required : false
11
- default : iPad Pro 13-inch (M4)
12
8
13
9
runs :
14
10
using : " composite"
@@ -27,26 +23,16 @@ runs:
27
23
pod install --repo-update
28
24
29
25
- name : Create iPhone Simulator
26
+ id : iphone_sim
30
27
uses : futureware-tech/simulator-action@v4
31
28
with :
32
29
model : ${{ inputs.IPHONE_DEVICE_MODEL }}
33
30
wait_for_boot : true
34
31
35
- - name : Create iPad Simulator
36
- uses : futureware-tech/simulator-action@v4
37
- with :
38
- model : ${{ inputs.IPAD_DEVICE_MODEL }}
39
- wait_for_boot : true
40
-
41
32
- name : Capture iPhone Screenshots
42
33
shell : bash
43
34
run : |
44
- DEVICE_NAME="${{ inputs.IPHONE_DEVICE_MODEL }}" flutter drive --driver=test_integration/test_driver.dart --target=test_integration/screenshots.dart -d "${{ inputs.IPHONE_DEVICE_MODEL }}"
45
-
46
- - name : Capture iPad Screenshots
47
- shell : bash
48
- run : |
49
- DEVICE_NAME="${{ inputs.IPAD_DEVICE_MODEL }}" flutter drive --driver=test_integration/test_driver.dart --target=test_integration/screenshots.dart -d "${{ inputs.IPAD_DEVICE_MODEL }}"
35
+ DEVICE_NAME="${{ inputs.IPHONE_DEVICE_MODEL }}" flutter drive --driver=test_integration/test_driver.dart --target=test_integration/screenshots.dart -d "${{ steps.iphone_sim.outputs.udid }}"
50
36
51
37
- name : Update Fastlane Metadata
52
38
if : ${{ github.event_name == 'push' }}
59
45
git clone --branch=fastlane-ios --depth=1 https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }} fastlane
60
46
cd fastlane
61
47
62
- rm -rf screenshots/*
48
+ rm -rf screenshots/iPhone *
63
49
cp -r ../../screenshots/. screenshots/
64
50
65
51
# Force push to fastlane branch
73
59
- name : Upload Screenshots
74
60
uses : actions/upload-artifact@v4
75
61
with :
76
- name : iOS Screenshots
62
+ name : iPhone Screenshots
77
63
path : screenshots/*
0 commit comments