Android GitHub Action
This GitHub Action allows you to build Android apps using Rock's remote build system. It supports both simulator builds for development and signed device builds for testing and release. If you haven't yet, please check the configuration guide where you can find information on optimal workflow setup, permissions, optimizations and GitHub Personal Access Tokens.
Development Builds For All Devices
Builds an APK (.apk) file in debug variants suitable for development. Doesn't require signing.
Running on GitHub Actions
Use in the GitHub Workflow file like this:
Tester Builds For All Devices
Builds an APK file in release variants suitable for testing. Requires signing.
Prerequisites
To build release artifacts, you'll need to export the release.keystore as base64 string, e.g. using the following command:
On GitHub Actions secrets and variables page you'll need to set up the following secrets for your GitHub repository:
KEYSTORE_BASE64– Base64 version of the release keystoreROCK_UPLOAD_STORE_FILE– Keystore store file nameROCK_UPLOAD_STORE_PASSWORD– Keystore store passwordROCK_UPLOAD_KEY_ALIAS– Keystore key aliasROCK_UPLOAD_KEY_PASSWORD– Keystore key password
Running on GitHub Actions
Use in the GitHub Workflow file like this:
Other Action Inputs
rock-build-extra-params
Default: ""
Pass extra parameters to the rock build:android command, in order to apply custom params for gradlew command.
re-sign
Default: false
Re-sign the APK with latest JS bytecode bundle with rock sign:android. Necessary for tester device builds.
When true, it will produce new artifact for every commit in a Pull Request, with a PR number appended to the original artifact name associated with native state of the app, e.g. rock-android-release-9482df3912-1337, where 1337 is the unique PR number.
To avoid polluting artifact storage it will also handle removal of old artifacts associated with older commits.
validate-gradle-wrapper
Default: true
For security reasons we add Gradle Wrapper validation step to Android build action. Pass false to disable validation.
working-directory
Default: .
When in monorepo, you may need to set the working directory something else than root of the repository.
For example in the following setup:
You'll need to set working-directory: ./packages/mobile:
Action Outputs
artifact-url
URL of the relevant Android build artifact.
artifact-id
ID of the relevant Android build artifact. Suitable for retrieving artifacts for reuse in other jobs.
