Allow bypassing confirmation in upload metadata via CI #2994
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |