Edit this page
Learn how to extend EAS Build with custom builds.
Custom builds allow customizing the build process for your project by running commands before, during, or after the build process. Customized builds can run from EAS CLI or when running builds in a React Native CI/CD pipeline, like with EAS Workflows.
1
To get started, create directories and a file named .eas/build/hello-world.yml at the same level as eas.json. The location and name of both directories are important for EAS Build to identify that a project contains a custom build config.
Inside the hello-world.yml, you'll write your custom build config. The filename is unimportant; you can name it whatever you want. The only requirement is that the file extension uses .yml.
Add the following custom build config steps in the file:
build:
name: Hello World!
steps:
- run: echo "Hello, world!"
2
config
property in eas.jsonTo use the custom build config, add the config
property in eas.json under a build profile.
Let's create a new build profile called test
under build
to run the custom config from the test.yml file:
{
"build": {
%%placeholder-start%%... %%placeholder-end%%
"test": {
"config": "test.yml",
},
}
If you wish to use separate configs for each platform, you can create separate YAML config files for Android and iOS. For example:
{
"build": {
%%placeholder-start%%... %%placeholder-end%%
"test": {
"ios": {
"config": "hello-ios.yml",
},
"android": {
"config": "hello-android.yml",
}
},
}
3
Check out the example repository for more detailed examples:
A custom EAS Build example that includes examples for custom builds such as setting up functions, using environment variables, uploading artifacts, and more.