forked from fossasia/pslab-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
63 lines (53 loc) · 2 KB
/
Copy pathaction.yml
File metadata and controls
63 lines (53 loc) · 2 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
name: "iPad Screenshots Workflow"
inputs:
IPAD_DEVICE_MODEL:
description: 'Model of the iPad device to be used when running tests'
required: false
default: iPad Pro 13-inch (M4)
runs:
using: "composite"
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
cache: false # TODO set to <true> after https://github.com/actions/runner/issues/449 is fixed
flutter-version-file: .flutter-version
- name: Update Podfile
shell: bash
run: |
cd ./iOS
flutter pub get
pod install --repo-update
- name: Create iPad Simulator
id: ipad_sim
uses: futureware-tech/simulator-action@v4
with:
model: ${{ inputs.IPAD_DEVICE_MODEL }}
wait_for_boot: true
- name: Capture iPad Screenshots
shell: bash
run: |
DEVICE_NAME="${{ inputs.IPAD_DEVICE_MODEL }}" flutter drive --driver=test_integration/test_driver.dart --target=test_integration/screenshots.dart -d "${{ steps.ipad_sim.outputs.udid }}"
- name: Update Fastlane Metadata
if: ${{ github.event_name == 'push' }}
shell: bash
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
cd ./iOS
git clone --branch=fastlane-ios --depth=1 https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }} fastlane
cd fastlane
rm -rf screenshots/iPad*
cp -r ../../screenshots/. screenshots/
# Force push to fastlane branch
git checkout --orphan temporary
git add --all .
git commit -am "[Auto] Update screenshots ($(date +%Y-%m-%d.%H:%M:%S))"
git branch -D fastlane-ios
git branch -m fastlane-ios
git push --force origin fastlane-ios
- name: Upload Screenshots
uses: actions/upload-artifact@v4
with:
name: iPad Screenshots
path: screenshots/*