55 types : [opened, synchronize, reopened, labeled, unlabeled]
66
77env :
8- S3_BUCKET : ${{ secrets.S3_BUCKET }}
9- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
10- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
118 CONFIGURE_ENCRYPTION_KEY : ${{ secrets.CONFIGURE_ENCRYPTION_KEY }}
129
1310jobs :
1411 build :
1512 name : Build Application
1613 if : contains(github.event.pull_request.labels.*.name, 'generate screenshots')
17- runs-on : macos-latest
14+ runs-on : macos-15
1815
1916 steps :
2017 - name : " Check out Project"
@@ -30,26 +27,21 @@ jobs:
3027 - name : Compile the App
3128 run : bundle exec fastlane build_screenshots
3229
33- - name : Archive App
30+ - name : Archive Build Products
3431 uses : actions/upload-artifact@v4
3532 with :
36- name : screenshot-app
37- path : fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app
38-
39- - name : Archive Runner
40- uses : actions/upload-artifact@v4
41- with :
42- name : screenshot-runner
43- path : fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
33+ name : screenshot-build-products
34+ path : fastlane/DerivedData/Build/Products/Debug-iphonesimulator/
35+ retention-days : 1
4436
4537 capture :
4638 name : Capture
4739 needs : build
48- runs-on : macos-latest
40+ runs-on : macos-15
4941
5042 strategy :
5143 matrix :
52- 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]
44+ language : [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]
5345 mode : [dark, light]
5446 steps :
5547 - uses : actions/checkout@v4
@@ -61,17 +53,11 @@ jobs:
6153 - name : Install Fastlane Dependencies
6254 run : bundle exec fastlane run configure_apply
6355
64- - name : Download Screenshot App
65- uses : actions/download-artifact@v4
66- with :
67- name : screenshot-app
68- path : fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app
69-
70- - name : Download Screenshot Runner
56+ - name : Download Build Products
7157 uses : actions/download-artifact@v4
7258 with :
73- name : screenshot-runner
74- path : fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
59+ name : screenshot-build-products
60+ path : fastlane/DerivedData/Build/Products/Debug-iphonesimulator/
7561
7662 - name : Generate Screenshots
7763 run : |
@@ -85,14 +71,18 @@ jobs:
8571 path : fastlane/logs
8672
8773 - name : Archive Generated Screenshots
88- run : |
89- cd fastlane && mkdir $GITHUB_RUN_ID && mv screenshots $GITHUB_RUN_ID
90- aws s3 cp $GITHUB_RUN_ID s3://$S3_BUCKET/$GITHUB_RUN_ID --recursive --exclude "*.html"
74+ uses : actions/upload-artifact@v4
75+ with :
76+ name : " screenshots-${{ matrix.language }}-${{ matrix.mode }}"
77+ path : fastlane/screenshots/
9178
9279 process :
9380 name : " Process Screenshots"
9481 needs : capture
95- runs-on : macos-latest
82+ runs-on : macos-15
83+
84+ env :
85+ BUNDLE_WITH : screenshots
9686
9787 steps :
9888 - uses : actions/checkout@v4
@@ -101,55 +91,50 @@ jobs:
10191 run : |
10292 brew install imagemagick@7
10393 brew link imagemagick@7 --force
94+ brew install automattic/build-tools/drawText
10495
10596 - name : " Set up Ruby"
10697 uses : ruby/setup-ruby@v1
10798 with :
10899 bundler-cache : true
109100
110- - name : Install Screenshot Gems
111- run : bundle install --with screenshots
112-
113101 - name : Install Fastlane Dependencies
114102 run : bundle exec fastlane run configure_apply
115103
116104 - name : Download Generated Screenshots
117- run : |
118- cd fastlane
119- aws s3 cp s3://$S3_BUCKET/$GITHUB_RUN_ID/screenshots screenshots/ --recursive --exclude "*.html"
105+ uses : actions/download-artifact@v4
106+ with :
107+ pattern : " screenshots-*"
108+ path : fastlane/screenshots/
109+ merge-multiple : true
120110
121- - name : Generate and Upload Screenshot Summary
111+ - name : Generate Screenshot Summary
122112 run : |
123113 bundle exec fastlane create_screenshot_summary
124- aws s3 cp fastlane/screenshots/screenshots.html s3://$S3_BUCKET/$GITHUB_RUN_ID/screenshots/screenshots.html
114+
115+ - name : Upload Screenshot Summary
116+ uses : actions/upload-artifact@v4
117+ with :
118+ name : screenshot-summary
119+ path : fastlane/screenshots/screenshots.html
125120
126121 - name : Archive Raw Screenshots
127122 uses : actions/upload-artifact@v4
128123 with :
129124 name : raw-screenshots
130125 path : fastlane/screenshots
131126
132- - name : Install Promo Screenshot Fonts
127+ - name : Setup Git LFS
133128 run : |
134- aws s3 cp s3://$S3_BUCKET/fonts.zip fonts.zip
135- unzip fonts.zip
136-
137- mkdir -p ~/Library/Fonts
138- cp -v fonts/*.otf ~/Library/Fonts
139- ls ~/Library/Fonts
140-
141- mkdir -p /Library/Fonts
142- cp -v fonts/*.otf /Library/Fonts
143- ls /Library/Fonts
144-
145- # Reset the font server in order to use these fonts
146- atsutil databases -removeUser
147- atsutil server -shutdown
148- atsutil server -ping
129+ # Install Git LFS if not available
130+ if ! command -v git-lfs &> /dev/null; then
131+ echo "Installing Git LFS..."
132+ brew install git-lfs
133+ fi
134+ git lfs install && git lfs fetch && git lfs pull
149135
150136 - name : Generate Promo Screenshots
151137 run : |
152- git lfs install && git lfs fetch && git lfs pull
153138 bundle exec fastlane create_promo_screenshots force:true
154139
155140 - name : Archive Promo Screenshots
0 commit comments