Commit 0308ef8
authored
Distribute v2 demo app builds to Firebase App Distribution (#1813)
* Distribute v2 demo app builds to Firebase App Distribution
Nothing was distributed from develop-v2, so the team had no way to test
v2 work. Add a workflow that builds the demo app on every push to
develop-v2 and uploads it to the stream-testers group in the shared
stream-android-32afb Firebase project.
The demo app google-services.json is left alone. It stays on
stream-video-9b586 so push and Crashlytics keep working. App Distribution
only needs the APK package name to match the registered app.
* Fix the APK artifact path in the app distribution workflow
The Upload APK step pointed at build/outputs/apk/demo-app/release, but
AGP writes to build/outputs/apk/<flavor>/<buildType>, so the directory
never existed. upload-artifact only warns when it finds no files, so the
step passed and every run uploaded an empty artifact.
* Harden the v2 distribution workflow
Address the security findings from the automated review:
- Drop the unused actions: write permission. The job only reads the repo
and uploads an artifact.
- Read the gpg passphrase from stdin instead of passing it as a command
line argument, where it is visible in the process list.
- Reference the secrets as shell variables rather than expanding them
into the run script, which removes the template injection surface.
- Delete the decrypted keystore, keystore properties and env properties
right after the build, so they are gone before the third-party Firebase
action runs.
- Pin actions/upload-artifact to a commit SHA, matching how checkout and
the Firebase action are already pinned.
* TEMPORARY: run the v2 distribution workflow from this PR branch
A push trigger reads the workflow file from the branch being pushed, and
workflow_dispatch is not available until the file reaches the default
branch. Adding this branch to the trigger is the only way to verify the
pipeline end to end before it lands on develop-v2.
Revert this commit before merging.
* Remove the temporary PR branch trigger
The pipeline was verified end to end from this branch in run 34132353521:
the keystore decrypted, the development release APK was assembled and
signed, the artifact uploaded, and the build was distributed to the
stream-testers group in stream-android-32afb.
The trigger has served its purpose, so the workflow now runs only on
develop-v2.
* Build only the distributed variant in the app distribution workflow
assembleRelease built the release variant of all three flavors, but the
job only uploads the development APK, so the e2etesting and production
builds were discarded. Assemble just the development release instead.
The Google Play pipeline is unaffected. internal-app-distribute.yml runs
publishBundle, and its playConfigs only registers productionRelease.1 parent 9008ff9 commit 0308ef8
2 files changed
Lines changed: 57 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments