Migrate Android fastlane to play_publisher and add release workflows - #2
Merged
Conversation
The Android Fastfile had grown to ~600 lines of Supply::Client workarounds for draft apps and the crashing supply Uploader/Setup paths. That code now lives in fastlane-plugin-play_publisher, so the Fastfile is just lane names. Lane names and behaviour are unchanged, except play_build now fails fast when android/key.properties is missing instead of silently producing a debug-signed AAB. Also adds the missing changelog for versionCode 1, a Releasing section to the README, and fastlane's generated artifacts to .gitignore.
Android Release and iOS Release both run on workflow_dispatch and drive the existing fastlane lanes. The popupbits apps call a shared reusable workflow for this, but that lives in a private repo and GitHub will not let a public repo in another org call it, so the steps are inlined here. Commits both Gemfile.locks — Bundler runs frozen in CI, so the release jobs need them — plus a Refresh Gemfile.lock workflow to regenerate them on a runner after a Gemfile change. match cannot install a certificate on a CI runner without an unlocked keychain, so sync_signing now calls setup_ci.
Without ANDROID_GOOGLE_SERVICES_JSON the Gradle FCM plugin is skipped and the release ships with push silently disabled, so decode it from a secret when present and warn when it is not. TestFlight rejects a re-upload at the same build number, so allow one to be passed at dispatch time instead of editing pubspec for every retry.
Google Play requires a 512x512 icon and a 1024x500 feature graphic before a listing can be published, and upload_screenshots had no images/ directory to read. Both are generated from the refetch mark and wordmark used by the web app. Screenshots still have to be captured by hand.
The publishing service account JSON is a private key; fastlane reads it through PLAY_STORE_JSON_KEY_PATH or PLAY_STORE_JSON_KEY_DATA, so it never needs to be in the tree.
# Conflicts: # README.md
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Brings the Android fastlane setup in line with the other popupbits Flutter apps, and adds the GitHub Actions release pipelines for both stores.
iOS fastlane was already identical to that standard (match signing, App Store Connect API key, metadata under
ios/fastlane/metadata/) — the only change there issetup_ci, see below.Android fastlane →
play_publisherThe Android
Fastfilehad grown to ~600 lines — mostlySupply::Clientplumbing to work around two upstream fastlane bugs (#21530, #21529) and Google Play's draft-app restriction. That code now lives infastlane-plugin-play_publisher, so the Fastfile here is just lane names.All nine lanes are unchanged —
build,internal,beta,release,upload_metadata,upload_screenshots,upload_listing,download_metadata,screenshots— verified withbundle exec fastlane lanesbefore and after.One behaviour change:
play_buildnow verifies release signing and fails ifandroid/key.propertiesis missing, instead of silently producing a debug-signed AAB that Play would reject on upload. SetPLAY_PUBLISHER_VERIFY_SIGNING=falseto opt out.Release workflows
internal/beta/release(+ release status)flutter test, runs the matching fastlane lanebeta(TestFlight) /release(App Store) /buildflutter build ios --no-codesign, then the lane; uploads the IPA as an artifactThe other popupbits apps call a shared reusable workflow (
popupbits/.github) for the Android one. That repo is private, and GitHub does not let a public repo in a different org call a private reusable workflow, so the steps are inlined here instead.Both
Gemfile.locks are now committed — Bundler runs frozen in CI, so the release jobs fail without them. They were resolved in aruby:3.2container and carry theruby,x86_64-linuxandaarch64-linuxplatforms; a frozenbundle installwas verified on Linux.sync_signingin the iOS Fastfile now callssetup_ci, since match cannot install a certificate on a runner with no unlocked keychain. It is a no-op outside CI.Also included
android/fastlane/metadata/android/en-US/changelogs/1.txt— the changelogs directory only had a.gitkeep, so aversionCode 1release would have shipped with no "what's new" text. Mirrors the existing iOSrelease_notes.txt.## Releasingsection in the README covering both platforms' lanes, required env vars and the workflows.fastlane/README.md,report.xml,.bundle/,vendor/) added to.gitignore.Before the first run
Set the repository secrets listed at the top of each workflow file. Neither workflow has ever run, so treat the first
internal/betabuild as the smoke test.Release enablement (later commits)
google-services.jsonin CI.android/app/build.gradle.ktsonly applies the FCM Gradle plugin when the file is present, so a CI build without it succeeds and ships with push silently disabled. The workflow now decodes it fromANDROID_GOOGLE_SERVICES_JSONand warns loudly when the secret is unset.build_numberat dispatch time instead of requiring a pubspec edit per retry.metadata/android/en-US/images/did not exist, soupload_screenshotshad nothing to upload and the listing could not be published. Added the required 512×512icon.pngand 1024×500featureGraphic.png, generated from the mark and wordmark the web app uses. Screenshots still have to be captured by hand — Play needs at least two phone screenshots.