Pre-packaged jobs
Edit this page
Learn how to set up and use pre-packaged jobs.
Pre-packaged jobs are ready-to-use workflow jobs that help you automate common tasks like building, submitting, and testing your app. They provide a standardized way to handle these operations without having to write custom job configurations from scratch. This guide covers the available pre-packaged jobs and how to use them in your workflows.
Build
Build your project into an Android or iOS app.
Build jobs can be customized so that you can execute custom commands during the build process. See Custom builds for more information.
Prerequisites
To successfully use the build job, you'll need to complete a build with EAS CLI using the same platform and profile as the pre-packaged job. Learn how to create your first build to get started.
Syntax
jobs:
build_app:
type: build
params:
platform: android | ios # required
profile: string # optional, default: production
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
platform | string | Required. The platform to build for. Can be either android or ios . |
profile | string | Optional. The build profile to use. Defaults to production . |
Outputs
You can reference the following outputs in subsequent jobs:
Output | Type | Description |
---|---|---|
build_id | string | The ID of the created build. |
app_build_version | string | The version code/build number of the app. |
app_identifier | string | The bundle identifier/package name of the app. |
app_version | string | The version of the app. |
channel | string | The update channel used for the build. |
distribution | string | The distribution method used. Can be internal or store . |
fingerprint_hash | string | The fingerprint hash of the build. |
git_commit_hash | string | The git commit hash used for the build. |
platform | string | The platform the build was created for. Either android or ios . |
profile | string | The build profile used. |
runtime_version | string | The runtime version used. |
sdk_version | string | The SDK version used. |
simulator | string | Whether the build is for simulator. |
Examples
Here are some practical examples of using the build job:
Basic build for a specific platform
This workflow builds your iOS app whenever you push to the main branch.
name: Build iOS app
on:
push:
branches: ['main']
jobs:
build_ios:
name: Build iOS
type: build
params:
platform: ios
profile: production
Build for both platforms in parallel
This workflow builds both Android and iOS apps in parallel when you push to the main branch.
name: Build for all platforms
on:
push:
branches: ['main']
jobs:
build_android:
name: Build Android
type: build
params:
platform: android
profile: production
build_ios:
name: Build iOS
type: build
params:
platform: ios
profile: production
Build with environment variables
This workflow builds your Android app with custom environment variables that can be used during the build process.
name: Build with environment variables
on:
push:
branches: ['main']
jobs:
build_android:
name: Build Android
type: build
env:
APP_ENV: production
API_URL: https://api.example.com
params:
platform: android
profile: production
Build with different profiles
This workflow creates two different Android builds using different profiles - one for internal distribution and one for store submission using the development and production profiles.
name: Build with different profiles
on:
push:
branches: ['main']
jobs:
build_android_development:
name: Build Android Development
type: build
params:
platform: android
profile: development
build_android_production:
name: Build Android Production
type: build
params:
platform: android
profile: production
Deploy
Deploy your application using EAS Hosting.
Prerequisites
To deploy your application using EAS Hosting, you'll need to set up your project. See Get Started with EAS Hosting for more information.
Syntax
jobs:
deploy_web:
type: deploy
params:
alias: string # optional
prod: boolean # optional
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
alias | string | Optional. The alias to deploy to. |
prod | boolean | Optional. Whether to deploy to production. |
Examples
Here are some practical examples of using the deploy job:
Basic deployment to production
This workflow deploys your application to production using EAS Hosting.
name: Basic Deployment
jobs:
deploy:
name: Deploy to Production
type: deploy
params:
prod: true
Deploy to production only on merges to the `main` branch
This workflow deploys your application to production when you merge to the main branch, and makes a non-production deployment on all other branches.
name: Deploy
on:
push:
branches: ['*']
jobs:
deploy:
name: Deploy
type: deploy
params:
prod: ${{ github.ref_name == 'main' }}
Deployment with custom alias
This workflow deploys your application to a custom alias in production.
name: Deployment with Alias
jobs:
deploy:
name: Deploy with Alias
type: deploy
params:
alias: my-custom-alias
prod: true
Fingerprint
Calculates a fingerprint of your project.
Note: This job type only supports CNG (managed) workflows. If you commit your android or ios directories, the fingerprint job won't work.
Syntax
jobs:
fingerprint:
type: fingerprint
params:
environment: production | preview | development # optional, defaults to production
env: # optional
APP_VARIANT: staging # just an example
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
environment | string | Optional. The environment to use. Can be production , preview , or development . Defaults to production . |
env | object | Optional. Environment variables to use during fingerprint calculation. |
Outputs
You can reference the following outputs in subsequent jobs:
Output | Type | Description |
---|---|---|
android_fingerprint_hash | string | The fingerprint hash for Android. |
ios_fingerprint_hash | string | The fingerprint hash for iOS. |
Examples
Here are some practical examples of using the fingerprint job:
Basic fingerprint calculation
This workflow calculates fingerprints for both Android and iOS builds in the production environment.
name: Basic Fingerprint
jobs:
fingerprint:
name: Calculate Fingerprint
type: fingerprint
params:
environment: production
Fingerprint with environment variables
This workflow calculates fingerprints with custom environment variables that can affect the build configuration.
name: Fingerprint with Environment Variables
jobs:
fingerprint:
name: Calculate Fingerprint
type: fingerprint
params:
environment: production
env:
APP_VARIANT: staging
API_URL: https://api.staging.example.com
Get Build
Retrieve an existing build from EAS that matches the provided parameters.
Syntax
jobs:
get_build:
type: get-build
params:
platform: ios | android # optional
profile: string # optional
distribution: store | internal | simulator # optional
channel: string # optional
app_identifier: string # optional
app_build_version: string # optional
app_version: string # optional
git_commit_hash: string # optional
fingerprint_hash: string # optional
sdk_version: string # optional
runtime_version: string # optional
simulator: boolean # optional
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
platform | string | Optional. The platform to get the build for. Can be ios or android . |
profile | string | Optional. The build profile to use. |
distribution | string | Optional. The distribution method. Can be store , internal , or simulator . |
channel | string | Optional. The update channel. |
app_identifier | string | Optional. The bundle identifier/package name. |
app_build_version | string | Optional. The build version. |
app_version | string | Optional. The app version. |
git_commit_hash | string | Optional. The git commit hash. |
fingerprint_hash | string | Optional. The fingerprint hash. |
sdk_version | string | Optional. The SDK version. |
runtime_version | string | Optional. The runtime version. |
simulator | boolean | Optional. Whether to get a simulator build. |
Outputs
You can reference the following outputs in subsequent jobs:
Output | Type | Description |
---|---|---|
build_id | string | The ID of the retrieved build. |
app_build_version | string | The build version of the app. |
app_identifier | string | The bundle identifier/package name of the app. |
app_version | string | The version of the app. |
channel | string | The update channel used for the build. |
distribution | string | The distribution method used. |
fingerprint_hash | string | The fingerprint hash of the build. |
git_commit_hash | string | The git commit hash used for the build. |
platform | string | The platform the build was created for. |
profile | string | The build profile used. |
runtime_version | string | The runtime version used. |
sdk_version | string | The SDK version used. |
simulator | string | Whether the build is for simulator. |
Examples
Here are some practical examples of using the get-build job:
Get latest production build
This workflow retrieves the latest production build for iOS from the store distribution channel.
name: Get Production Build
jobs:
get_build:
name: Get Latest Production Build
type: get-build
params:
platform: ios
profile: production
distribution: store
channel: production
Get build by version
This workflow retrieves a specific version of an Android build by its app version and build version.
name: Get Build by Version
jobs:
get_build:
name: Get Specific Version Build
type: get-build
params:
platform: android
app_identifier: com.example.app
app_version: 1.0.0
app_build_version: 42
Get simulator build
This workflow retrieves a simulator build for iOS development.
name: Get Simulator Build
jobs:
get_build:
name: Get Simulator Build
type: get-build
params:
platform: ios
simulator: true
profile: development
Submit
Submit an Android or iOS build to the app store using EAS Submit.
Prerequisites
Submission jobs require additional configuration to run within a CI/CD process. See our Apple App Store CI/CD submission guide and Google Play Store CI/CD submission guide for more information.
Syntax
jobs:
submit_to_store:
type: submit
params:
build_id: string # required
profile: string # optional, default: production
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
build_id | string | Required. The ID of the build to submit. |
profile | string | Optional. The submit profile to use. Defaults to production . |
Outputs
You can reference the following outputs in subsequent jobs:
Output | Type | Description |
---|---|---|
apple_app_id | string | The Apple App ID of the submitted build. |
ios_bundle_identifier | string | The iOS bundle identifier of the submitted build. |
android_package_id | string | The Android package ID of the submitted build. |
Examples
Here are some practical examples of using the submit job:
Submit iOS build
This workflow submits an iOS build to the App Store using the production submit profile.
name: Submit iOS Build
jobs:
build_ios:
name: Build iOS
type: build
params:
platform: ios
profile: production
submit:
name: Submit to App Store
type: submit
needs: [build_ios]
params:
build_id: ${{ needs.build_ios.outputs.build_id }}
profile: production
Submit Android build
This workflow submits an Android build to the Play Store using the production submit profile.
name: Submit Android Build
jobs:
build_android:
name: Build Android
type: build
params:
platform: android
profile: production
submit:
name: Submit to Play Store
type: submit
needs: [build_android]
params:
build_id: ${{ needs.build_android.outputs.build_id }}
profile: production
Update
Publish an update using EAS Update.
Prerequisites
To publish update previews and to send over-the-air updates, you'll need to run npx eas-cli@latest update:configure
, then create new builds. Learn more about configuring EAS Update.
Syntax
jobs:
publish_update:
type: update
params:
message: string # optional
platform: string # optional - android | ios | all, defaults to all
branch: string # optional
channel: string # optional - cannot be used with branch
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
message | string | Optional. Message to use for the update. If not provided, the commit message will be used. |
platform | string | Optional. Platform to use for the update. Can be android , ios , or all . Defaults to all . |
branch | string | Optional. Branch to use for the update. If not provided, the branch from the workflow run will be used. For manually run workflows you need to provide a value. Example: ${{ github.ref_name || 'testing' }} . Provide either a branch or a channel, not both. |
channel | string | Optional. Channel to use for the update. Provide either a branch or a channel, not both. |
Outputs
You can reference the following outputs in subsequent jobs:
Output | Type | Description |
---|---|---|
first_update_group_id | string | The ID of the first update group. |
updates_json | string | A JSON string containing information about all update groups. |
Examples
Here are some practical examples of using the update job:
Basic update to production channel
This workflow publishes an update to the production channel whenever you push to the main branch, using the commit message as the update message.
name: Update Production
on:
push:
branches: ['main']
jobs:
update_production:
name: Update Production Channel
type: update
params:
channel: production
Platform-specific updates
This workflow publishes separate updates for Android and iOS platforms, allowing for platform-specific changes.
name: Platform-specific Updates
on:
push:
branches: ['main']
jobs:
update_android:
name: Update Android
type: update
params:
platform: android
channel: production
update_ios:
name: Update iOS
type: update
params:
platform: ios
channel: production
Update with branch-based deployment
This workflow publishes updates based on the branch name, allowing for different environments (staging/production) based on the branch.
name: Branch-based Updates
on:
push:
branches: ['main', 'staging']
jobs:
update_branch:
name: Update Branch
type: update
params:
branch: ${{ github.ref_name }}
message: 'Update for branch: ${{ github.ref_name }}'
Maestro
Run Maestro tests on a Android emulator or iOS Simulator build.
Maestro tests are experimental and may experience flakiness.
Syntax
jobs:
run_maestro_tests:
type: maestro
environment: production | preview | development # optional, defaults to preview
image: string # optional. See https://docs.expo.dev/build-reference/infrastructure/ for a list of available images.
params:
build_id: string # required
flow_path: string | string[] # required
shards: number # optional, defaults to 1
retries: number # optional, defaults to 1
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
build_id | string | Required. The ID of the build to test. |
flow_path | string | Required. The path to the Maestro flow file(s) to run. |
shards | number | Optional and experimental. The number of shards to split the tests into. Defaults to 1. |
retries | number | Optional. The number of times to retry failed tests. Defaults to 1. |
Examples
Here are some practical examples of using the Maestro job:
Basic Maestro test
This workflow runs Maestro tests on an iOS Simulator build using the default settings.
name: Basic Maestro Test
jobs:
test:
name: Run Maestro Tests
type: maestro
environment: preview
params:
build_id: ${{ needs.build_ios_simulator.outputs.build_id }}
flow_path: ./maestro/flows
Maestro test with sharding
This workflow runs Maestro tests on an Android emulator build with 3 shards and 2 retries for failed tests.
name: Sharded Maestro Test
jobs:
test:
name: Run Sharded Maestro Tests
type: maestro
environment: preview
runs_on: linux-large-nested-virtualization
params:
build_id: ${{ needs.build_android_emulator.outputs.build_id }}
flow_path: ./maestro/flows
shards: 3
retries: 2
Slack
Send a message to a Slack channel using a Slack webhook URL.
Syntax
jobs:
send_slack_notification:
type: slack
params:
webhook_url: string # required
message: string # required if payload is not provided
payload: object # required if message is not provided
Parameters
You can pass the following parameters into the params
list:
Parameter | Type | Description |
---|---|---|
webhook_url | string | Required. The Slack webhook URL to send the message to. Currently only hardcoded strings are supported. Using webhooks stored in env are upcoming but not yet supported. |
message | string | Required if payload is not provided. The message to send. |
payload | object | Required if message is not provided. The Slack Block Kit payload to send. |
Examples
Here are some practical examples of using the Slack job:
Basic build notification
This workflow builds an iOS app and then sends a notification with the app identifier and version from the build job outputs.
name: Build Notification
jobs:
build_ios:
name: Build iOS
type: build
params:
platform: ios
profile: production
notify_build:
name: Notify Build Status
needs: [build_ios]
type: slack
params:
webhook_url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
message: 'Build completed for app ${{ needs.build_ios.outputs.app_identifier }} (version ${{ needs.build_ios.outputs.app_version }})'
Rich build notification with Block Kit
This workflow builds an Android app and sends a rich notification using the build job outputs.
name: Rich Build Notification
jobs:
build_android:
name: Build Android
type: build
params:
platform: android
profile: production
notify_build:
name: Notify Build Status
needs: [build_android]
type: slack
params:
webhook_url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
payload:
blocks:
- type: header
text:
type: plain_text
text: 'Build Completed'
- type: section
fields:
- type: mrkdwn
text: "*App:*\n${{ needs.build_android.outputs.app_identifier }}"
- type: mrkdwn
text: "*Version:*\n${{ needs.build_android.outputs.app_version }}"
- type: section
fields:
- type: mrkdwn
text: "*Build ID:*\n${{ needs.build_android.outputs.build_id }}"
- type: mrkdwn
text: "*Platform:*\n${{ needs.build_android.outputs.platform }}"
- type: section
text:
type: mrkdwn
text: 'Distribution: ${{ needs.build_android.outputs.distribution }}'