Skip to content
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

chore: setup release infrastructure #1181

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

AsCress
Copy link
Contributor

@AsCress AsCress commented Jan 30, 2025

Sets up a release infrastructure for our repository.

  1. Every push triggers the screenshot workflows which then update the fastlane metadata with the latest screenshots.
  2. Every release promotes a given build from testing to production for both Android and iOS, with the body of the release as the changelog.
  3. All the screenshots in README now point to the latest ones always present in the fastlane branches.

Summary by Sourcery

Set up release infrastructure for Android and iOS. Update screenshots in the README to always point to the latest screenshots stored in the fastlane branches. On every release, promote the given build from testing to production and use the release body as the changelog.

CI:

  • Automate the screenshot workflow to update Fastlane metadata and screenshots on every push, except for pull requests.

Deployment:

  • Promote releases to production for Android and iOS using Fastlane.

Documentation:

  • Update README screenshots to use the latest screenshots from the fastlane branches.

Copy link
Contributor

sourcery-ai bot commented Jan 30, 2025

Reviewer's Guide by Sourcery

This pull request sets up the release infrastructure for the repository. It introduces workflows that trigger on every push to update the fastlane metadata with the latest screenshots and on every release to promote a given build from testing to production for both Android and iOS. Additionally, the README.md file is updated to point to the latest screenshots in the fastlane branches.

Sequence diagram for the screenshot workflow

sequenceDiagram
    participant GH as GitHub
    participant WF as Screenshot Workflow
    participant FA as Fastlane Android
    participant FI as Fastlane iOS

    Note over GH,FI: On every push
    GH->>WF: Trigger screenshot workflow
    WF->>WF: Capture Android screenshots
    WF->>FA: Update Android metadata
    WF->>WF: Capture iOS screenshots
    WF->>FI: Update iOS metadata
    FA-->>GH: Push to fastlane-android branch
    FI-->>GH: Push to fastlane-ios branch
Loading

Sequence diagram for the release workflow

sequenceDiagram
    participant GH as GitHub
    participant WF as Release Workflow
    participant FA as Fastlane Android
    participant FI as Fastlane iOS
    participant PS as Play Store
    participant AS as App Store

    Note over GH,AS: On new release
    GH->>WF: Trigger release workflow
    WF->>FA: Update changelogs
    WF->>FI: Update changelogs
    FA-->>PS: Promote to production
    FI-->>AS: Promote to production
Loading

File-Level Changes

Change Details Files
Set up release workflow for Android.
  • Added a job to update fastlane metadata for Android.
  • Added a job to push the Android version to production.
.github/workflows/release.yml
Set up release workflow for iOS.
  • Added a job to update fastlane metadata for iOS.
  • Added a job to push the iOS version to production.
.github/workflows/release.yml
Update screenshot action for iOS.
  • Renamed the screenshot files to include the device model.
  • Added a step to update the fastlane metadata with the latest screenshots.
.github/actions/screenshot-ios/action.yml
Update screenshot action for Android.
  • Added a step to update the fastlane metadata with the latest screenshots.
.github/actions/screenshot-android/action.yml
Update README to point to the latest screenshots.
  • Updated the screenshot section to point to the latest screenshots in the fastlane branches.
README.md
Remove timestamp from screenshot file names.
  • Removed the timestamp from the screenshot file names.
test_integration/test_driver.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@AsCress AsCress requested a review from adityastic January 30, 2025 17:07
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @AsCress - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

.github/actions/screenshot-ios/action.yml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Copy link

github-actions bot commented Jan 30, 2025

Build failed

@AsCress AsCress force-pushed the release_infra branch 2 times, most recently from f4b2a13 to bae4dbd Compare January 30, 2025 18:32
.github/actions/screenshot-ios/action.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@adityastic adityastic merged commit d8658d3 into fossasia:flutter_app Jan 31, 2025
5 of 6 checks passed
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