Rock ships with a ready-to-use GitHub Actions:
which you can include in your GHA workflows to build iOS and Android apps and store native artifacts to reuse across CI jobs and local dev environment through Rock CLI.
This is the recommended base setup for a GitHub Workflow file running our GitHub Actions that:
main
branchYou'll be asked about this token when cached build is available while running the rock run:ios
or rock run:android
commands. The token is necessary for downloading cached builds.
Generate a fine-grained Personal Access Token and set Resource owner to your organization. Ensure the following repository permissions:
Generate GitHub Personal Access Token for downloading cached builds with repo
permissions.
rock.config.mjs
Typically, you'll use .env
file to store your GitHub Personal Access Token, next to other project secrets securely, not exposing it to the public.
Here, we'll use the dotenv
package to load the .env
file:
When using GitHub Actions workflows with Rock, you can optimize your CI/CD pipelines by using paths-ignore
to skip unnecessary workflow runs. This can significantly reduce CI time and costs, especially in large repositories where not all changes require rebuilding the mobile applications.
Add a paths-ignore
section to your workflow's trigger configuration to specify which file patterns should not trigger the workflow:
With this base setup, you are now ready to follow the iOS and Android instructions that will get you through setting up the GitHub Actions jobs
for building your app for simulator and device targets.