Edit this page
Learn about the process of triggering builds from a GitHub repository.
Expo GitHub App automatically triggers builds from our GitHub projects with EAS. We can trigger builds for any build profile based on our development team's preferences. It also allows triggering builds for git
push committed directly to a repository or a pull request.
In this chapter, we'll configure this functionality. We already have a GitHub repository for our example app to demonstrate this.
1
To use this functionality, we need to connect our GitHub account:
2
To enable triggering builds from a GitHub repository, we need to connect it to our project in the Expo dashboard:
3
The Expo GitHub app needs to know where to find the source code of our project. By default, it selects the root directory using /
. In our example project, the source code is also available in the root repository. We can leave this to default in the Expo dashboard.
4
The Expo GitHub app provides us multiple options to trigger a build, such as:
To automatically trigger a build using a GitHub PR label, we're going to utilize the third option from the list above:
We need to specify the build image that we will be using. Open eas.json, and under the development
profile, add android.image
and ios.image
properties and set their value to latest
.
{
"build": {
"development": {
%%placeholder-start%%... %%placeholder-end%%
"android": {
"image": "latest"
},
"ios": {
"image": "latest"
}
}
}
%%placeholder-start%%... %%placeholder-end%%
}
Next, let's create a new branch called dev
, and make a change in our app's JavaScript code. Then, commit the change, push the branch, and create a PR from that branch.
In the PR link, under Labels, create a label called eas-build-all:development
.
Click Create pull request button to create the PR. The Expo GitHub app will start the process of creating a development build.
In the Expo dashboard, on the Builds page, we can verify that the builds for both Android and iOS are triggered.
Chapter 11: Trigger builds from a GitHub repository
We successfully linked our GitHub account with Expo, connected our repository to our EAS project, and learned about automated development build creation using GitHub PR labels.
Learn about the next steps to use EAS.