HomeGuidesReferenceLearn

Trigger builds from the Expo GitHub App

Learn how to trigger builds on EAS for your app using the Expo GitHub App.


You can trigger builds on EAS for your app from a CI environment such as GitHub Actions, Travis CI, and more.

Before building with EAS on CI, you'll need to install and configure eas-cli. Then, you can trigger new builds with the eas build command.

Prerequisites

While in preview, this feature is only available to EAS subscribers.

Run a successful build from your local machine

To trigger EAS builds from a GitHub repo, you'll need to configure your project for EAS Build and successfully run a build from your computer for each platform that you'd like to support on GitHub.

If you have run eas build -p [all|ios|android] successfully before, then you can continue. If you haven't done this yet, refer to the Create your first build and return here when ready.

Configure your app for GitHub

Link your GitHub repository to your Expo project

Visit your project's GitHub settings page.

The project GitHub settings page

Install the Expo GitHub App on your GitHub account.

The GitHub app installation UI

Link your GitHub account to your Expo account.

Note: You must be an admin of the Expo account to install the app. Also, You can only link GitHub organizations to Expo organizations.

The GitHub account linking UI

Then, you'll be able to link your repository to your Expo project.

The repository selector on the Expo project GitHub settings page

Configure your repository settings

Before you run a build, the Expo GitHub App needs to know where to find the source code for your project. If your Expo project source code is in the root of your repository, then you don't need to do anything. If your Expo project source code is in a subdirectory, then you'll need to configure "Base directory" settings for your repository on your project's GitHub settings page.

The base directory input on the Expo project GitHub settings page

Trigger a build from GitHub

Once you've configured your app for GitHub, you can trigger a build from GitHub by using the UI on your project's build list page or by labels on your GitHub PRs.

Build using the Expo website

Visit your project's build list page and click the "Build from GitHub" button. You'll be prompted to select a Git ref (branch/commit/tag), a platform to build for, and the build profile to apply to it.

You can also specify a base directory for this specific build. That will not change the global settings for this project.

The build from GitHub UI on the Expo project builds list page

Build using GitHub PR labels

You can trigger a build from a GitHub PR by adding a label to the PR. The label must be in the form of eas-build-[platform]:[profile] where [platform] is either android, ios, or all and [profile] is the name of a build profile specified in your eas.json file. If you don't specify a build platform, it will default to all. If you don't speficy a build profile, it will default to production.

For example, if you want to trigger a production build for Android, add the label eas-build-android to the PR.

A PR with the eas-build label and live status checks

The build will be triggered for the latest commit on the PR's base branch. You can view the status of the build in the PR's checks. A link to the build will be available in the check's details.

EAS Build check details on a GitHub PR
  • Ask a question on the forums

  • Edit this page

Was this doc helpful?