-
Notifications
You must be signed in to change notification settings - Fork 181
68 lines (66 loc) · 2.05 KB
/
ios-commit-snapshots.yml
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
name: ios-commit-snapshots
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'ios/**'
jobs:
take-snapshots:
name: "iOS Take and Commit Snapshots"
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- uses: actions/setup-java@v1
with:
java-version: '11'
- name: Select Xcode Version
run: sudo xcode-select -s '/Applications/Xcode_13.0.app'
- name: Show Xcode Version
run: xcodebuild -version
- uses: eskatos/gradle-command-action@v1
with:
arguments: "ios-framework:createXCFramework"
dependencies-cache-key: |
**/*.gradle
**/*.gradle.kts
buildSrc/src/**/*.kt
**/gradle.properties
gradle/**
- name: Generate Strings & Colors & Assets
working-directory: ./ios
run: make run-swiftgen
- name: Take Snapshots
working-directory: ./ios
run: make take-snapshots
- name: Add LFS tracked file
run: |
git lfs track "**/__Snapshots__/*/*.png"
- name: Create Snapshots commit
run: |
git add -A
git commit -m "[iOS] Update iOS Snapshots" | echo
- name: Create Updated asset-id commit
run: |
git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
git add -A
git commit -m "Update asset-id" | echo
- name: Create Update Snapshots PullRequest
uses: peter-evans/create-pull-request@v3
with:
branch: update-ios-snapshots
delete-branch: true
branch-suffix: short-commit-hash
title: "[iOS] Update iOS Snapshots"
reviewers: ry-itto,ostk0069