Skip to content

Attempt at fixing the Github screenshots workflow #14556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,10 @@ jobs:
run: bundle exec fastlane build_screenshots

- name: Archive App
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: screenshot-app
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app

- name: Archive Runner
uses: actions/upload-artifact@v1
with:
name: screenshot-runner
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
name: build
path: fastlane/DerivedData/Build/Products/

capture:
name: Capture
Expand All @@ -55,8 +49,8 @@ jobs:

strategy:
matrix:
language: [ar, de-DE, en-US, es-ES, fr-FR, he, id, it, ja, ko, nl-NL, pt-BR, ru, sv, tr, zh-Hans, zh-Hant]
mode: [dark, light]
language: [ar-SA]
mode: [light]
steps:
- uses: actions/checkout@v1
- name: "Set up Ruby"
Expand All @@ -68,28 +62,29 @@ jobs:
run: bundle exec fastlane run configure_apply

- name: Download Screenshot App
uses: actions/download-artifact@v1
with:
name: screenshot-app
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app

- name: Download Screenshot Runner
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: screenshot-runner
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
name: build
path: fastlane/DerivedData/Build/Products/

- name: Generate Screenshots
run: |
bundle exec fastlane take_screenshots languages:${{ matrix.language }} mode:${{ matrix.mode }}

- name: Store Logs
if: always()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: "screenshot-log-${{ matrix.language }}-${{ matrix.mode }}"
path: fastlane/logs

- name: Store test results
if: always()
uses: actions/upload-artifact@v4
with:
name: "test-results-${{ matrix.language }}-${{ matrix.mode }}"
path: fastlane/screenshots/test_output

- name: Archive Generated Screenshots
run: |
cd fastlane && mkdir $GITHUB_RUN_ID && mv screenshots $GITHUB_RUN_ID
Expand Down Expand Up @@ -130,7 +125,7 @@ jobs:
aws s3 cp fastlane/screenshots/screenshots.html s3://$S3_BUCKET/$GITHUB_RUN_ID/screenshots/screenshots.html

- name: Archive Raw Screenshots
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: raw-screenshots
path: fastlane/screenshots
Expand Down Expand Up @@ -159,7 +154,7 @@ jobs:
bundle exec fastlane create_promo_screenshots force:true

- name: Archive Promo Screenshots
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: promo-screenshots
path: fastlane/promo_screenshots
4 changes: 1 addition & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ FASTLANE_METADATA_FOLDER = File.join(FASTLANE_DIR, 'metadata')
WORKSPACE_PATH = File.join(PROJECT_ROOT_FOLDER, 'WooCommerce.xcworkspace')
BUILDKITE_RELEASE_PIPELINE = 'release-builds.yml'
IOS_LOCALES = %w[ar-SA de-DE en-US es-ES fr-FR he id it ja ko nl-NL pt-BR ru sv tr zh-Hans zh-Hant].freeze
SIMULATOR_VERSION = '16.0' # For screenshots
SIMULATOR_VERSION = '18.1' # For screenshots
SCREENSHOTS_SCHEME = 'WooCommerceScreenshots'
SCREENSHOT_DEVICES = [
'iPhone 11 Pro Max',
'iPhone 8 Plus',
'iPad Pro (12.9-inch) (2nd generation)',
'iPad Pro (12.9-inch) (3rd generation)'
].freeze

Expand Down
109 changes: 0 additions & 109 deletions fastlane/screenshots.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,6 @@
"device_frame_size": [966, 1954],
"device_frame_offset": [138, 571]
},
{
"name": "iPhone 8 Plus",
"canvas_size": [1242,2208],
"text_size": [810, 371],
"text_offset": [216, 0],
"font_size": "68px",
"screenshot_size": [729, 1296],
"screenshot_offset": [257, 585],
"device_frame": "appstoreres/assets/iphone-8.png",
"device_frame_size": [838, 1727],
"device_frame_offset": [202, 372]
},
{
"name": "iPad Pro 12.9 (2nd Generation)",
"canvas_size": [2048,2732],
"text_size": [1848, 559],
"text_offset": [100, 0],
"font_size": "100px",
"screenshot_size": [1290, 1721],
"screenshot_offset": [380, 707],
"device_frame": "appstoreres/assets/ipad.png",
"device_frame_size": [1400, 2015],
"device_frame_offset": [324, 559]
},
{
"name": "iPad Pro 12.9 (3rd Generation)",
"canvas_size": [2048,2732],
Expand Down Expand Up @@ -98,91 +74,6 @@
"text": "metadata/{locale}/app_store_screenshot_5.txt"
},

// iPhone 8 Plus
// Track sales and bestselling products
{
"device": "iPhone 8 Plus",
"filename": "iPhone 8 Plus-01.png",
"background": "#674399",
"screenshot": "iPhone 8 Plus-1-dark-order-dashboard.png",
"text": "metadata/{locale}/app_store_screenshot_1.txt"
},
// Create orders on the fly
{
"device": "iPhone 8 Plus",
"filename": "iPhone 8 Plus-02.png",
"background": "#C9356E",
"screenshot": "iPhone 8 Plus-2-light-order-creation.png",
"text": "metadata/{locale}/app_store_screenshot_2.txt"
},
// Take payments in person
{
"device": "iPhone 8 Plus",
"filename": "iPhone 8 Plus-03.png",
"background": "#674399",
"screenshot": "iPhone 8 Plus-3-dark-order-payment.png",
"text": "metadata/{locale}/app_store_screenshot_3.txt"
},
// Add and edit products with a touch
{
"device": "iPhone 8 Plus",
"filename": "iPhone 8 Plus-04.png",
"background": "#C9356E",
"screenshot": "iPhone 8 Plus-4-light-product-add.png",
"text": "metadata/{locale}/app_store_screenshot_4.txt"
},
// Get notified of every sale
{
"device": "iPhone 8 Plus",
"filename": "iPhone 8 Plus-05.png",
"background": "#674399",
"screenshot": "iPhone 8 Plus-5-dark-order-notification.png",
"text": "metadata/{locale}/app_store_screenshot_5.txt"
},


/// iPad Pro 12.9 (2nd Generation)
// Track sales and bestselling products
{
"device": "iPad Pro 12.9 (2nd Generation)",
"filename": "iPad Pro (12.9-inch) (2nd generation)-01.png",
"background": "#674399",
"screenshot": "iPad Pro (12.9-inch) (2nd generation)-1-dark-order-dashboard.png",
"text": "metadata/{locale}/app_store_screenshot_1.txt"
},
// Create orders on the fly
{
"device": "iPad Pro 12.9 (2nd Generation)",
"filename": "iPad Pro (12.9-inch) (2nd generation)-02.png",
"background": "#C9356E",
"screenshot": "iPad Pro (12.9-inch) (2nd generation)-2-light-order-creation.png",
"text": "metadata/{locale}/app_store_screenshot_2.txt"
},
// Take payments in person
{
"device": "iPad Pro 12.9 (2nd Generation)",
"filename": "iPad Pro (12.9-inch) (2nd generation)-03.png",
"background": "#674399",
"screenshot": "iPad Pro (12.9-inch) (2nd generation)-3-dark-order-payment.png",
"text": "metadata/{locale}/app_store_screenshot_3.txt"
},
// Add and edit products with a touch
{
"device": "iPad Pro 12.9 (2nd Generation)",
"filename": "iPad Pro (12.9-inch) (2nd generation)-04.png",
"background": "#C9356E",
"screenshot": "iPad Pro (12.9-inch) (2nd generation)-4-light-product-add.png",
"text": "metadata/{locale}/app_store_screenshot_4.txt"
},
// Get notified of every sale
{
"device": "iPad Pro 12.9 (2nd Generation)",
"filename": "iPad Pro (12.9-inch) (2nd generation)-05.png",
"background": "#674399",
"screenshot": "iPad Pro (12.9-inch) (2nd generation)-5-dark-order-notification.png",
"text": "metadata/{locale}/app_store_screenshot_5.txt"
},

/// iPad Pro 12.9 (3rd Generation)
// Track sales and bestselling products
{
Expand Down
Loading