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:

ParameterTypeDescription
platformstringRequired. The platform to build for. Can be either android or ios.
profilestringOptional. The build profile to use. Defaults to production.

Outputs

You can reference the following outputs in subsequent jobs:

OutputTypeDescription
build_idstringThe ID of the created build.
app_build_versionstringThe version code/build number of the app.
app_identifierstringThe bundle identifier/package name of the app.
app_versionstringThe version of the app.
channelstringThe update channel used for the build.
distributionstringThe distribution method used. Can be internal or store.
fingerprint_hashstringThe fingerprint hash of the build.
git_commit_hashstringThe git commit hash used for the build.
platformstringThe platform the build was created for. Either android or ios.
profilestringThe build profile used.
runtime_versionstringThe runtime version used.
sdk_versionstringThe SDK version used.
simulatorstringWhether 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.

.eas/workflows/build-ios.yml
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.

.eas/workflows/build-all.yml
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.

.eas/workflows/build-with-env.yml
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.

.eas/workflows/build-profiles.yml
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:

ParameterTypeDescription
aliasstringOptional. The alias to deploy to.
prodbooleanOptional. 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.

.eas/workflows/deploy-basic.yml
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.

.eas/workflows/deploy.yml
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.

.eas/workflows/deploy-alias.yml
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:

ParameterTypeDescription
environmentstringOptional. The environment to use. Can be production, preview, or development. Defaults to production.
envobjectOptional. Environment variables to use during fingerprint calculation.

Outputs

You can reference the following outputs in subsequent jobs:

OutputTypeDescription
android_fingerprint_hashstringThe fingerprint hash for Android.
ios_fingerprint_hashstringThe 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.

.eas/workflows/fingerprint-basic.yml
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.

.eas/workflows/fingerprint-with-env.yml
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:

ParameterTypeDescription
platformstringOptional. The platform to get the build for. Can be ios or android.
profilestringOptional. The build profile to use.
distributionstringOptional. The distribution method. Can be store, internal, or simulator.
channelstringOptional. The update channel.
app_identifierstringOptional. The bundle identifier/package name.
app_build_versionstringOptional. The build version.
app_versionstringOptional. The app version.
git_commit_hashstringOptional. The git commit hash.
fingerprint_hashstringOptional. The fingerprint hash.
sdk_versionstringOptional. The SDK version.
runtime_versionstringOptional. The runtime version.
simulatorbooleanOptional. Whether to get a simulator build.

Outputs

You can reference the following outputs in subsequent jobs:

OutputTypeDescription
build_idstringThe ID of the retrieved build.
app_build_versionstringThe build version of the app.
app_identifierstringThe bundle identifier/package name of the app.
app_versionstringThe version of the app.
channelstringThe update channel used for the build.
distributionstringThe distribution method used.
fingerprint_hashstringThe fingerprint hash of the build.
git_commit_hashstringThe git commit hash used for the build.
platformstringThe platform the build was created for.
profilestringThe build profile used.
runtime_versionstringThe runtime version used.
sdk_versionstringThe SDK version used.
simulatorstringWhether 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.

.eas/workflows/get-build-production.yml
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.

.eas/workflows/get-build-version.yml
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.

.eas/workflows/get-build-simulator.yml
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:

ParameterTypeDescription
build_idstringRequired. The ID of the build to submit.
profilestringOptional. The submit profile to use. Defaults to production.

Outputs

You can reference the following outputs in subsequent jobs:

OutputTypeDescription
apple_app_idstringThe Apple App ID of the submitted build.
ios_bundle_identifierstringThe iOS bundle identifier of the submitted build.
android_package_idstringThe 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.

.eas/workflows/submit-ios.yml
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.

.eas/workflows/submit-android.yml
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:

ParameterTypeDescription
messagestringOptional. Message to use for the update. If not provided, the commit message will be used.
platformstringOptional. Platform to use for the update. Can be android, ios, or all. Defaults to all.
branchstringOptional. 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.
channelstringOptional. 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:

OutputTypeDescription
first_update_group_idstringThe ID of the first update group.
updates_jsonstringA 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.

.eas/workflows/update-production.yml
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.

.eas/workflows/update-platforms.yml
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.

.eas/workflows/update-branches.yml
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:

ParameterTypeDescription
build_idstringRequired. The ID of the build to test.
flow_pathstringRequired. The path to the Maestro flow file(s) to run.
shardsnumberOptional and experimental. The number of shards to split the tests into. Defaults to 1.
retriesnumberOptional. 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.

.eas/workflows/maestro-basic.yml
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.

.eas/workflows/maestro-sharded.yml
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:

ParameterTypeDescription
webhook_urlstringRequired. 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.
messagestringRequired if payload is not provided. The message to send.
payloadobjectRequired 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.

.eas/workflows/slack-build-notification.yml
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.

.eas/workflows/slack-rich-notification.yml
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 }}'