-
Notifications
You must be signed in to change notification settings - Fork 285
69 lines (56 loc) · 1.93 KB
/
screenshots.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
69
# All this work is based off
# https://github.com/woocommerce/woocommerce-ios/blob/ed0d71d7dd4a40802a0d38d82cf2eb0e8cc45cd4/.github/workflows/screenshots.yml
name: Screenshots
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
env:
CONFIGURE_ENCRYPTION_KEY: ${{ secrets.CONFIGURE_ENCRYPTION_KEY }}
BUNDLE_PATH: vendor/bundle
jobs:
build:
name: Generate Screenshots
if: contains(github.event.pull_request.labels.*.name, 'Needs Screenshots')
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.5.x' # Same as project's .ruby-version
- name: Install Bundler
run: gem install bundler
- name: Restore Ruby Dependency Cache
id: restore-ruby-dependency-cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
- name: Install Ruby Dependencies
run: |
bundle install
- name: Restore CocoaPods Dependency Cache
id: restore-cocoapods-dependency-cache
uses: actions/cache@v1
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
- name: Install App Dependencies
run: bundle exec rake dependencies
- name: Take all screenshots
run: bundle exec fastlane take_screenshots
- uses: actions/upload-artifact@v1
name: Upload all screenshots as artifacts
with:
name: screenshots
path: fastlane/screenshots
- name: Compose
run: |
git lfs fetch && git lfs checkout
brew install pkg-config imagemagick@6
BUNDLE_WITH=screenshots bundle install
bundle exec fastlane create_promo_screenshots
- uses: actions/upload-artifact@v1
name: Upload all promo screenshots as artifacts
with:
name: promo_screenshots
path: fastlane/promo_screenshots