Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 6 additions & 57 deletions .github/workflows/flutter-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
type: string
default: beta
publish-track:
description: "Manual runs from a release's tag: `production` or the open testing track (play-beta-track). `listing`, from any tag, only replaces the Google Play screenshots (screenshots-task)."
description: "Manual runs from a release's tag: `production` or the open testing track (play-beta-track)."
type: string
publish-platforms:
description: "Manual runs: `all` (the default), `android` or `ios`."
Expand All @@ -44,9 +44,6 @@ on:
pages:
description: Deploy the web builds to GitHub Pages once Pages is enabled for the repository.
type: boolean
screenshots-task:
description: Prefix of the app's mise tasks that render the store screenshots (flutter-screenshots.yml); production releases then replace the store screenshots that differ. Empty for none.
type: string
environment:
description: Environment of the jobs that use signing or store credentials; empty for none.
type: string
Expand Down Expand Up @@ -134,23 +131,6 @@ jobs:
exit 1
;;
esac
if [ "$EVENT" = workflow_dispatch ] && [ "$TRACK" = listing ]; then
# The store listing alone: no version, release or build.
if [ "$PLATFORMS" = ios ]; then
echo "::error::App Store screenshots change only with a new App Store version: publish a production release."
exit 1
fi
echo "::notice::App Store screenshots change only with a new App Store version, so the next production release updates them."
{
echo "mode=listing"
echo "manual=true"
echo "channel=listing"
echo "android=true"
echo "ios=false"
echo "tag=$TAG"
} >> "$GITHUB_OUTPUT"
exit 0
fi
# [v]X.Y.Z, or [v]X.Y.Z-<label><N> such as 1.2.0-beta.3 or 1.2.0-rc2;
# the label is free text, only N counts.
semver='^v?(0|[1-9][0-9]{0,3})\.(0|[1-9][0-9]?)\.(0|[1-9][0-9]?)(-([0-9A-Za-z.-]*[A-Za-z.-])?([1-9][0-9]?))?$'
Expand Down Expand Up @@ -493,12 +473,11 @@ jobs:

google-play:
name: Google Play
needs: [plan, publish, promote, screenshots]
needs: [plan, publish, promote]
if: >-
${{ !cancelled() && inputs.android-package != '' && vars.GOOGLE_PLAY_SERVICE_ACCOUNT != ''
&& needs.plan.outputs.android == 'true' && needs.screenshots.result != 'failure'
&& (needs.publish.result == 'success' || needs.promote.result == 'success'
|| needs.plan.outputs.mode == 'listing') }}
&& needs.plan.outputs.android == 'true'
&& (needs.publish.result == 'success' || needs.promote.result == 'success') }}
runs-on: ubuntu-24.04
timeout-minutes: 30
environment: ${{ inputs.environment }}
Expand Down Expand Up @@ -539,11 +518,6 @@ jobs:
PREFIX: ${{ inputs.artifact-prefix }}
TAG: ${{ needs.plan.outputs.tag }}
run: gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern "${PREFIX}-${TAG}.aab" --dir dist
- if: ${{ needs.screenshots.result == 'success' }}
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: screenshots-android
path: screenshots
- id: auth
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
Expand All @@ -565,7 +539,6 @@ jobs:
TAG: ${{ needs.plan.outputs.tag }}
VERSION_CODE: ${{ needs.plan.outputs.build-number }}
NOTES_LANGUAGE: ${{ inputs.play-notes-language }}
SCREENSHOTS_DIR: ${{ needs.screenshots.result == 'success' && 'screenshots' || '' }}
run: python3 .infra/scripts/google_play.py

ios-archive:
Expand Down Expand Up @@ -736,10 +709,10 @@ jobs:
# Gives a pre-release's TestFlight build to its testers; submits a release or
# a promoted pre-release for App Review.
name: App Store Connect
needs: [plan, ios-upload, promote, screenshots]
needs: [plan, ios-upload, promote]
if: >-
${{ !cancelled() && inputs.bundle-id != '' && vars.APP_STORE_CONNECT_KEY_ID != ''
&& needs.plan.outputs.ios == 'true' && needs.screenshots.result != 'failure'
&& needs.plan.outputs.ios == 'true'
&& (needs.ios-upload.result == 'success' || needs.promote.result == 'success') }}
runs-on: ubuntu-24.04
# Waits for App Store Connect to process a new upload.
Expand Down Expand Up @@ -772,11 +745,6 @@ jobs:
path: .infra
persist-credentials: false
sparse-checkout: scripts
- if: ${{ needs.screenshots.result == 'success' }}
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: screenshots-ios
path: screenshots
- name: Finish the upload
env:
KEY_ID: ${{ vars.APP_STORE_CONNECT_KEY_ID }}
Expand All @@ -790,7 +758,6 @@ jobs:
VERSION: ${{ needs.plan.outputs.version }}
BUILD_NUMBER: ${{ needs.plan.outputs.build-number }}
USES_NON_EXEMPT_ENCRYPTION: ${{ vars.APP_STORE_USES_NON_EXEMPT_ENCRYPTION }}
SCREENSHOTS_DIR: ${{ needs.screenshots.result == 'success' && 'screenshots' || '' }}
run: |
KEY_PATH="$RUNNER_TEMP/AuthKey_${KEY_ID}.p8"
export KEY_PATH
Expand All @@ -799,24 +766,6 @@ jobs:
unset KEY # the script only needs the file
python3 .infra/scripts/app_store_submit.py

screenshots:
# Rendered from the tag for the store listings, which go with production.
needs: plan
if: >-
${{ inputs.screenshots-task != '' && (needs.plan.outputs.mode == 'listing'
|| needs.plan.outputs.channel == 'prod' && needs.plan.outputs.mode != 'skip') }}
permissions:
contents: read # clone the repository
uses: $/.github/workflows/flutter-screenshots.yml
with:
app-dir: ${{ inputs.app-dir }}
task: ${{ inputs.screenshots-task }}
platforms: >-
${{ needs.plan.outputs.android != 'true' && 'ios'
|| needs.plan.outputs.ios != 'true' && 'android' || 'all' }}
mise-version: ${{ inputs.mise-version }}
macos-runner: ${{ inputs.macos-runner }}

pages:
name: GitHub Pages
needs: [plan, publish, promote, rename]
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/flutter-screenshots.yml

This file was deleted.

22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Infrastructure of SilverNETGroupSGGW:
| --- | --- |
| [`flutter-ci.yml`](.github/workflows/flutter-ci.yml) | Lints and tests the app, checks generated code, builds the release APKs and the web app, optionally the iOS app |
| [`flutter-release.yml`](.github/workflows/flutter-release.yml) | Builds a GitHub release, attaches the builds to it and publishes them to the stores and Pages; promotes a tested beta without rebuilding it |
| [`flutter-screenshots.yml`](.github/workflows/flutter-screenshots.yml) | Renders the store screenshots with the app's mise tasks: Android on Linux, iOS on macOS |
| [`flutter-pages.yml`](.github/workflows/flutter-pages.yml) | Serves the newest release's web build at the site root and the newest build of any kind, usually a beta, under `/beta/` |

Each app keeps short caller workflows and implements a few `mise` tasks (the
Expand Down Expand Up @@ -153,7 +152,6 @@ workflow only gets what it uses.
| `publish-track`, `publish-platforms` | | Manual runs: where to publish the release's builds (below) |
| `play-notes-language` | `en-US` | Language of the Google Play release notes; one of the store listing's languages |
| `pages` | `false` | Deploy the web builds to GitHub Pages once Pages is enabled for the repository |
| `screenshots-task` | | Prefix of the mise tasks that render the store screenshots (below); empty for none |
| `environment` | | Environment of the jobs that use signing or store credentials, e.g. one with required reviewers |
| `build-tools` | `flutter,java` | mise tools the Android and web builds install |
| `macos-runner`, `xcode-version`, `mise-version` | `macos-26`, `26.6`, newest release | |
Expand Down Expand Up @@ -212,19 +210,6 @@ them.
builds that the release's run uploaded go to `production` (App Review on
iOS) or the open testing track (the public TestFlight beta) without being
rebuilt. `platforms` limits it to `android` or `ios`. Pages is not changed.
- **Screenshots:** with `screenshots-task`, production releases and
promotions run the app's `<task>:android` (Linux, with Noto Color Emoji)
and `<task>:ios` (macOS, with the San Francisco font) mise tasks, which
write `<app-dir>/build/screenshots/<platform>/<device>/<language>/*.png`.
Every listing language (`en-US`, or else `en`) gets its folder, in file
name order, where it differs from the store: Google Play's listing for the
devices `phone`, `tablet-7` and `tablet-10`, and the App Store version for
`iphone-6.9` (the required large iPhone size, 1320×2868) and `ipad-13`
(2064×2752). Testing tracks keep the listing.
A manual run with the track `listing`, from any tag, replaces only the
Google Play screenshots (Google reviews the listing). App Store screenshots
change only with a new App Store version, so production releases update
them.
- **Release notes:** the release description becomes the store release notes
(Google Play: up to 500 characters; App Store: "What's New" in every
language).
Expand Down Expand Up @@ -441,10 +426,9 @@ The workflow signs in with Workload Identity Federation, set up by
`terraform/apps`. Invite its `releases@<project>.iam.gserviceaccount.com`
service account in Play Console (Users and permissions) with "Release to
testing tracks" and "Release to production, exclude devices, and use Play App
Signing" for this app only, plus "Manage store presence" with
`screenshots-task` (the listing's screenshots). Store the upload key as
secrets of the release environment (without `--env release` while the app
has no environment):
Signing" for this app only. Store the upload key as secrets of
the release environment (without `--env release` while the app has no
environment):

```sh
base64 -w0 key.jks | gh secret set ANDROID_KEYSTORE_BASE64 --env release
Expand Down
Loading