Skip to content

ci: restore SampleApp Android APK upload to S3#3725

Merged
oliverlaz merged 1 commit into
developfrom
ci/restore-sample-app-apk-s3-upload
Jul 10, 2026
Merged

ci: restore SampleApp Android APK upload to S3#3725
oliverlaz merged 1 commit into
developfrom
ci/restore-sample-app-apk-s3-upload

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Jul 10, 2026

Copy link
Copy Markdown
Member

🎯 Goal

Restore the public download link for the SampleApp Android build: https://getstream.io/downloads/rn-sample-app.apk.

This S3 upload was removed in #3334 ("chore: add android build and deploy workflows and improve ios workflow"), which replaced the S3-based Android job with Firebase App Distribution. Firebase serves internal QA testers, but it dropped the public, unauthenticated download link that lives on our own domain. This PR brings that link back alongside Firebase.

πŸ›  Implementation details

Re-adds the S3 upload as two steps in the existing build_and_deploy_android_firebase job in sample-distribution.yml:

  • Configure AWS credentials β€” aws-actions/configure-aws-credentials@v4 (the previous code used the now-EOL v1), authenticating with the AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY secrets.
  • Upload APK to S3 β€” copies the APK to rn-sample-app.apk and runs aws s3 cp ... --sse AES256.

Notable choices:

  • No rebuild. The upload reuses the APK the Fastlane step already produces at examples/SampleApp/app-build/reactnativesampleapp.apk, so the previous manual react-native bundle + gradlew assembleRelease steps are not reintroduced.
  • Object key unchanged (rn-sample-app.apk) so the existing public URL keeps working.
  • develop-only, matching the original behavior.
  • Firebase distribution is kept β€” this is additive.

🎨 UI Changes

N/A β€” CI/workflow-only change, no UI impact.

πŸ§ͺ Testing

CI-only change; verified by the develop pipeline rather than the example apps:

  1. On merge to develop, the build_and_deploy_android_firebase job runs the two new steps.
  2. Confirm the Upload APK to S3 step succeeds in the Actions logs.
  3. Confirm https://getstream.io/downloads/rn-sample-app.apk downloads the latest build.

β˜‘οΈ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

Re-adds the S3 upload of the SampleApp release APK that powers the public
download link (https://getstream.io/downloads/rn-sample-app.apk). This was
dropped in #3334 when Android distribution was moved to Firebase App
Distribution.

The upload reuses the APK already built by the Fastlane step (no rebuild),
runs on develop only, and keeps the object key rn-sample-app.apk so the
existing public URL keeps working. Firebase distribution for internal
testers is kept alongside it.
@oliverlaz
oliverlaz requested review from isekovanic and szuperaz July 10, 2026 09:40
@oliverlaz
oliverlaz merged commit c79da00 into develop Jul 10, 2026
12 checks passed
@oliverlaz
oliverlaz deleted the ci/restore-sample-app-apk-s3-upload branch July 10, 2026 09:52
oliverlaz added a commit that referenced this pull request Jul 10, 2026
## 🎯 Goal

Follow-up to #3725 (merged), which restored the SampleApp Android APK
upload to S3 that powers
`https://getstream.io/downloads/rn-sample-app.apk`. That upload fails on
the self-hosted `public` runner because the AWS CLI is not installed
there (the original S3 job ran on GitHub-hosted `ubuntu-latest`, where
`aws` is preinstalled). This PR makes the job install the AWS CLI when
it is missing so the upload can succeed.

## πŸ›  Implementation details

Adds an `Ensure AWS CLI is available` step to the
`build_and_deploy_android_firebase` job in
[`sample-distribution.yml`](.github/workflows/sample-distribution.yml),
before the AWS credentials/upload steps:

- No-op when `aws` is already on `PATH` (so it costs nothing if the
runner image gains the CLI later).
- Otherwise installs AWS CLI v2 from the official bundle,
architecture-aware (`x86_64` / `aarch64`).
- Installs to a user-writable location (`$HOME/.local/...`) with no
`sudo`, then appends the bin dir to `$GITHUB_PATH` so the subsequent
`Upload APK to S3` step picks it up.
- Runs on `develop` only, matching the rest of the S3 flow.

## 🎨 UI Changes

N/A β€” CI/workflow-only change, no UI impact.

## πŸ§ͺ Testing

CI-only change; verified by the `develop` pipeline rather than the
example apps:

1. On merge to `develop`, the `build_and_deploy_android_firebase` job
runs the new install step and logs the resolved `aws --version`.
2. Confirm the `Upload APK to S3` step now succeeds in the Actions logs.
3. Confirm `https://getstream.io/downloads/rn-sample-app.apk` serves the
latest build.

## β˜‘οΈ Checklist

- [ ] I have signed the [Stream
CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform)
(required)
- [x] PR targets the `develop` branch
- [ ] Documentation is updated
- [ ] New code is tested in main example apps, including all possible
scenarios
  - [ ] SampleApp iOS and Android
  - [ ] Expo iOS and Android
@stream-ci-bot

Copy link
Copy Markdown
Contributor

πŸŽ‰ This PR is included in version 9.7.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants