Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Generate app store screenshots programmatically during the build instead of committing static assets.

Changes

  • Integration test infrastructure: Added integration_test dependency and test driver to capture screenshots at runtime
  • Screenshot generation: Created integration_test/screenshot_test.dart that renders demo UI at target dimensions:
    • Phone: 1140×2616 (2 screenshots)
    • Tablet: 2248×2480 (2 screenshots)
    • macOS: 1280×800 (2 screenshots)
  • Build workflow: Added step to run integration tests, generate screenshots, package into SwiftControl.screenshots.zip, and attach to releases

Implementation

Screenshots are generated by rendering Flutter widgets at specific screen sizes during test execution:

// Set target dimensions
binding.window.physicalSizeTestValue = const Size(1140, 2616);

// Render demo UI
await tester.pumpWidget(MaterialApp(home: DemoScreen()));

// Capture screenshot
await binding.takeScreenshot('mob1');

The test driver intercepts screenshot callbacks and writes PNG files to build/screenshots/ which are then zipped and attached to the GitHub release.

Original prompt

during the build github actions pipeline create an extra step that creates screenshots for the Apple App Store and Google Play Store, then create a zip file and attach it to the release


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 11, 2025 07:19
Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
Copilot AI changed the title [WIP] Add screenshot generation for app store releases Add dynamic screenshot generation to build pipeline Nov 11, 2025
Copilot AI requested a review from jonasbark November 11, 2025 07:30
Copilot finished work on behalf of jonasbark November 11, 2025 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants