Skip to content

Fix part of #6106: Add build_and_sign.yml workflow for building, signing, and archiving release AABs#6267

Open
Sandesh282 wants to merge 8 commits into
oppia:prepare-for-release-automationfrom
Sandesh282:PR1.2/build-and-sign-workflow-fresh
Open

Fix part of #6106: Add build_and_sign.yml workflow for building, signing, and archiving release AABs#6267
Sandesh282 wants to merge 8 commits into
oppia:prepare-for-release-automationfrom
Sandesh282:PR1.2/build-and-sign-workflow-fresh

Conversation

@Sandesh282

@Sandesh282 Sandesh282 commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes part of #6106

Explanation

Adds the build_and_sign.yml GitHub Actions workflow that allows a release coordinator to build, sign, and archive a release AAB for any flavor (alpha, beta, ga) from the GitHub Actions UI with a single manual trigger.

This workflow:

  • Accepts two workflow_dispatch inputs: flavor (choice: alpha/beta/ga) and source_ref (must be latest-alpha or match release-X.Y format), validated before any build step runs
  • Authenticates to GCP via Workload Identity Federation and provisions the release keystore from GCP Secret Manager
  • Builds the signed AAB via bazel build --compilation_mode=opt with //config:keystore_* Bazel flags: signing and renaming are handled by the _sign_and_rename_aab rule from Fix #5033, #6215, #6217, #6218, #6219, #6220, #6221, #6222, #6223: Prepare for release automation #6265
  • Uploads the signed AAB to the flavor-specific GCS archive bucket with an existence check to enforce the build-once guarantee
  • Runs under environment: oppia-android-release-env requiring reviewer approval before any step executes
  • Uses concurrency with cancel-in-progress: false to prevent mid-signing interruptions

Integration Testing Notes

Tested against a personal GCP project (sandesh-oppia-release-dev) using a fork. Verified:

  • WIF authentication exchanges GitHub OIDC token for GCP credentials
  • bazel build --compilation_mode=opt compiles the full app (~27 min on ubuntu-latest)
  • AAB is located and version/RC metadata is extracted correctly
  • gsutil cp uploads the AAB to the correct GCS path (gs://bucket/VERSION/RCNUM/name.aab)
  • Build-once guard rejects duplicate uploads

Remaining Work (draft)

  • Create oppia-android-release-env GitHub environment with required reviewers (needs repo admin)

Essential Checklist

  • The PR title starts with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The explanation section above starts with "Fixes #bugnum: " (If this PR fixes part of an issue, use instead: "Fixes part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

@Sandesh282 Sandesh282 requested a review from a team as a code owner May 29, 2026 18:37
@Sandesh282 Sandesh282 requested a review from manas-yu May 29, 2026 18:37
@Sandesh282 Sandesh282 marked this pull request as draft May 29, 2026 18:45
@github-actions

Copy link
Copy Markdown

@Sandesh282 this PR is being marked as draft because the PR description should not use 'Fix #' or 'Fix part of #' syntax. Instead use 'Fixes' and 'Fixes part of', per referenced issue(s): #6106.

@Sandesh282 Sandesh282 marked this pull request as ready for review May 29, 2026 19:32
@Sandesh282

Copy link
Copy Markdown
Collaborator Author

@adhiamboperes
The workflow references environment: oppia-android-release-env but this environment doesn't exist yet in the repo settings. Could you create it under oppia/oppia-android → Settings → Environments with required reviewers configured? This is the approval gate that runs before any signing step executes.

@github-actions

Copy link
Copy Markdown

Coverage Report

Results

Coverage Analysis: SKIP ⏭️

This PR did not introduce any changes to Kotlin source or test files.

To learn more, visit the Oppia Android Code Coverage wiki page

@github-actions

Copy link
Copy Markdown

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics

Universal APK

APK file size: 19 MiB (old), 19 MiB (new), 3460 bytes (Removed)

APK download size (estimated): 18 MiB (old), 18 MiB (new), 4323 bytes (Removed)

Method count: 265520 (old), 265374 (new), 146 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 7119 (old), 7119 (new), 0 (No change)

  • Anim: 43 (old), 43 (new), 0 (No change)
  • Animator: 26 (old), 26 (new), 0 (No change)
  • Array: 15 (old), 15 (new), 0 (No change)
  • Attr: 922 (old), 922 (new), 0 (No change)
  • Bool: 9 (old), 9 (new), 0 (No change)
  • Color: 1005 (old), 1005 (new), 0 (No change)
  • Dimen: 1093 (old), 1093 (new), 0 (No change)
  • Drawable: 393 (old), 393 (new), 0 (No change)
  • Id: 1363 (old), 1363 (new), 0 (No change)
  • Integer: 37 (old), 37 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 401 (old), 401 (new), 0 (No change)
  • Menu: 3 (old), 3 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • Raw: 2 (old), 2 (new), 0 (No change)
  • String: 938 (old), 938 (new), 0 (No change)
  • Style: 840 (old), 840 (new), 0 (No change)
  • Xml: 7 (old), 7 (new), 0 (No change)

Lesson assets: 113 (old), 113 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 19 MiB (old), 19 MiB (new), 3460 bytes (Removed)
APK download size (estimated): 18 MiB (old), 18 MiB (new), 1739 bytes (Removed)
Method count: 265520 (old), 265374 (new), 146 (Removed)

Configuration hdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 18 KiB (old), 18 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change)
APK download size (estimated): 21 KiB (old), 21 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 64 KiB (old), 64 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Alpha

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 284 bytes (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 516 bytes (Removed)

Method count: 118637 (old), 118613 (new), 24 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 284 bytes (Removed)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 511 bytes (Removed)
Method count: 118637 (old), 118613 (new), 24 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Beta

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 268 bytes (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 1328 bytes (Added)

Method count: 118641 (old), 118617 (new), 24 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 272 bytes (Removed)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 828 bytes (Added)
Method count: 118641 (old), 118617 (new), 24 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Ga

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 336 bytes (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 449 bytes (Removed)

Method count: 118641 (old), 118617 (new), 24 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 340 bytes (Removed)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 186 bytes (Removed)
Method count: 118641 (old), 118617 (new), 24 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

@Sandesh282 Sandesh282 changed the base branch from develop to prepare-for-release-automation June 3, 2026 18:49
@adhiamboperes

Copy link
Copy Markdown
Contributor

@manas-yu, do you have a moment to look at this PR?

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.

3 participants