Repository navigation
CC-169: capture iOS App Store screenshots on a runner and upload them to App Store Connect #271
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
Open
jaywedgeworth22
wants to merge
36
commits into
main
Choose a base branch
from
minimax/ios-appstore-screenshots
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,267
−39
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
7a9c4ea
CC-169: capture iOS App Store screenshots on a runner and upload them…
jaywedgeworth22 cdd9dfc
CC-169: keep the seeded App Store snapshot to platforms that render a…
jaywedgeworth22 5a70093
CC-169: fix the capture script bugs the review bots found
jaywedgeworth22 34c9b5f
CC-169: fail the capture when the pixels are not the family we booted
jaywedgeworth22 9c82aae
CC-169: find the iPad simulator by prefix, not by exact name
jaywedgeworth22 73a92de
CC-169: always regenerate the companion project before the capture
jaywedgeworth22 15370c5
CC-169: refuse a mixed screenshot list before anything is reserved
jaywedgeworth22 6a27530
CC-169: wait for the app to draw before capturing a screenshot
jaywedgeworth22 4b15713
CC-169: label the source scope after the device and open the alarms t…
jaywedgeworth22 d8e8301
autofix: pass empty launch args through Bash 3.2 set -u
github-actions[bot] 690bec3
CC-169: keep the capture script inside what Bash 3.2 can run
jaywedgeworth22 597996e
CC-169: answer the eight screenshot-tooling review findings
jaywedgeworth22 fbe9a61
autofix: create the per-device capture directory and correct the chec…
github-actions[bot] 279e6e9
Merge fbe9a61aa5eb97f07d1e26b2c28f7dd4abaf061e into d1e4fdd5e6117a2d4…
jaywedgeworth22 0dcb81e
autofix: reject a truncated PNG before reading its header
github-actions[bot] c6f81da
Merge 0dcb81e0d8e09efffd5b281f01464f0b53981227 into d1e4fdd5e6117a2d4…
jaywedgeworth22 ac5ced0
autofix: fix the real defects in the screenshot tooling review
github-actions[bot] a64389d
CC-169: close the second round of screenshot-tooling findings
jaywedgeworth22 debf87a
CC-169: close the third round of screenshot-tooling findings
jaywedgeworth22 ea8b466
Merge debf87aff9e62d6ba5c2e7e3f2843dd319966dca into 771b1d05296a39c69…
jaywedgeworth22 8e42882
autofix: keep a malformed newest-build probe out of "none"
github-actions[bot] db35f69
CC-169: identify the key in play with the fleet's masked preview
jaywedgeworth22 a1736c5
Merge db35f69c33775827e383a99228ec766ef7301567 into 771b1d05296a39c69…
jaywedgeworth22 22a94a9
autofix: keep the HTTP status and validate the app id on an ASC lookup
github-actions[bot] 97367f8
CC-169: submit the version for review only when it is ready
jaywedgeworth22 10b330c
autofix: make the masked ASC key preview identify the key it previews
github-actions[bot] aa2a080
CC-169: refuse a version whose version string is not the build's
jaywedgeworth22 dccc12d
CC-169: merge main into the screenshot branch
jaywedgeworth22 a74c43a
merge main into minimax/ios-appstore-screenshots
swu-echo[bot] 9025657
CC-169: make the submit-review gate honest about what it checked
jaywedgeworth22 da841d9
CC-169: correct the comment that contradicted the masked preview
jaywedgeworth22 93dec10
autofix: answer the four open submit-review findings
github-actions[bot] 56eeaab
CC-169: let the upload side take a Mac screenshot too
jaywedgeworth22 6a6e68c
CC-169: refuse a submission when the build's marketing version is unr…
jaywedgeworth22 5224ad7
autofix: read the marketing version off the pre-release version
github-actions[bot] 17103ac
CC-169: say which field the marketing version is read from
jaywedgeworth22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| name: iOS App Store Screenshots | ||
|
|
||
| # Captures the App Store screenshots for the CodeCaps iOS companion. | ||
| # | ||
| # There is no iOS simulator runtime on Jay's Mac, so the captures have to come | ||
| # from a runner. The script builds the companion for one iPhone and one iPad | ||
| # simulator, seeds each with a realistic quota snapshot and writes one PNG per | ||
| # screen at the exact pixel size App Store Connect accepts, asserting the size | ||
| # before the file is handed on. | ||
| # | ||
| # The app needs seconds to draw its first frame, so the script polls the screen | ||
| # and keeps the first frame that holds more than the status bar. A fixed | ||
| # sleep captured a blank window, and a blank window is a picture of nothing. | ||
| # | ||
| # The upload to App Store Connect is deliberately NOT done here. It is a | ||
| # separate, explicit step run from a machine with the App Store Connect key: | ||
| # | ||
| # node scripts/ios-fleet/asc-api.mjs upload-screenshots \ | ||
| # <localizationId> auto app_iphone_67-fleet-status.png | ||
| # node scripts/ios-fleet/asc-api.mjs upload-screenshots \ | ||
| # <localizationId> auto app_ipad_pro_129-fleet-status.png | ||
| # | ||
| # so a re-run of this workflow can never quietly add duplicate screenshots to | ||
| # a live version. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "ios/CodeCapsCompanion/**" | ||
| # The exact shared files the companion compiles, and not the whole of | ||
| # Sources/QuotaCore: most QuotaCore edits are Mac-only, and a capture | ||
| # that shows more than the shipped build would be worse than a stale | ||
| # one. This list mirrors ios-ship.yml, so the screenshots and the | ||
| # TestFlight build change together. | ||
| - "Sources/QuotaCore/CompanionReadTokenStore.swift" | ||
| - "Sources/QuotaCore/FleetSourceDisagreement.swift" | ||
| - "Sources/QuotaCore/QuotaWindowVocabulary.swift" | ||
| - "Sources/QuotaCore/ResetAlarmCadence.swift" | ||
| - "Sources/QuotaCore/ResetAlarmMessage.swift" | ||
| - "Sources/QuotaCore/ResetAlarmTracker.swift" | ||
| - "Sources/QuotaCore/WidgetPlatformDisplay.swift" | ||
| - "Sources/QuotaCore/WidgetSnapshotFetcher.swift" | ||
| # The helpers the capture calls. A change to either of them changes | ||
| # what the capture keeps, so it has to bring a new capture with it. | ||
| - "scripts/ios-fleet/capture-appstore-screenshots.sh" | ||
| - "scripts/ios-fleet/pick_simulator.py" | ||
| - "scripts/ios-fleet/screenshot_ink.py" | ||
| - ".github/workflows/ios-appstore-screenshots.yml" | ||
|
|
||
| concurrency: | ||
| group: ios-appstore-screenshots-${{ github.ref }} | ||
| # Only supersede a run for the same pull request. Cancelling on a push to | ||
| # main would report cancelled checks for a commit that nothing replaced. | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| screenshots: | ||
| name: Capture iPhone and iPad screenshots | ||
| runs-on: macos-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
|
|
||
| - name: Install XcodeGen | ||
| run: | | ||
| if ! command -v xcodegen >/dev/null 2>&1; then | ||
| brew install xcodegen | ||
| fi | ||
|
|
||
| - name: Capture App Store screenshots | ||
| run: | | ||
| chmod +x scripts/ios-fleet/capture-appstore-screenshots.sh | ||
| scripts/ios-fleet/capture-appstore-screenshots.sh "$RUNNER_TEMP/appstore-screenshots" | ||
|
|
||
| - name: Report the captured sizes | ||
| run: | | ||
| for shot in "$RUNNER_TEMP"/appstore-screenshots/*; do | ||
| echo "::group::$(basename "$shot")" | ||
| sips -g pixelWidth -g pixelHeight -g hasAlpha "$shot" | grep -E "pixel|/sips" || true | ||
| echo "::endgroup::" | ||
| done | ||
|
|
||
| - name: Upload the captured screenshots | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: appstore-screenshots | ||
| path: ${{ runner.temp }}/appstore-screenshots/* | ||
| if-no-files-found: error | ||
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,5 @@ DerivedData/ | |
| xcuserdata/ | ||
| _site/ | ||
| ios/CodeCapsCompanion/build/ | ||
| __pycache__/ | ||
| *.pyc | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.