Circle CI (Expo EAS)

💡
BETA mode. Your feedback is highly appreciated!

Setup Expo (EAS) with Circle CI to upload your Android (APK) and iOS (IPA) to TestApp.io for testing and feedback.

Connect Expo EAS with CircleCI

In order to automatically trigger the CircleCI pipeline, we need to connect our CircleCI project to our repository.

When creating a new CircleCI project, you will have the option to connect a specific repository to the CircleCI project. After the two are linked, we just need to create the environment variables for the CircleCI project.

For more information about creating a CircleCI project, see this.

Environment variables

In order to know where to upload the EAS build, you need to provide the environment variables in the Circle CI project. See this guide for how to add environment variables.

The following environment variables need to be set:

Filters

In the example configuration, if you look at the workflows in the config, we have a filter to only start the pipeline when the staging branch is changing. If you need to listen for code changes in other branches, just change this value to match your own branch name.

iOS

In this example, we are using the Expo EAS build tool to locally build the app on a CircleCI macOS virtual machine.

EAS is using Fastlane under the hood and is automatically preparing the credentials and signing the build for you. For more information about the local EAS iOS build process, refer to the expo docs.

Create config.yml

version: 2.1

orbs:
  node: circleci/node@5.0

jobs:
  eas_ios_staging_build:
    macos:
      xcode: '15.0.0'
    steps:
      - checkout
      - run:
          name: Install Cocoapods
          command: gem install cocoapods
      - node/install-packages:
          pkg-manager: yarn
      - run:
          name: iOS build
          command: npx eas-cli build -p ios --profile staging --local --non-interactive --clear-cache --output "./ipa/ios-staging-build.ipa"

      - run:
          name: Upload to TestApp.io
          command: |
            export INSTALL_DIR=/tmp
            curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash
            $INSTALL_DIR/ta-cli publish --api_token=$TESTAPPIO_API_TOKEN --app_id=$TESTAPPIO_APP_ID --release="ios" --ipa=./ipa/ios-staging-build.ipa --notify=true --git_release_notes=true --git_commit_id=true --source="Circle CI"

workflows:
  ios_staging_build:
    jobs:
      - eas_ios_staging_build:
          filters:
            branches:
              only: staging

Android

In this example, we are using the Expo EAS build tool to locally build the app in a Docker container on CircleCI.

EAS is using Fastlane under the hood and is automatically preparing the credentials and signing the build for you. For more information about the local EAS Android build process, refer to the expo docs.

version: 2.1

orbs:
  node: circleci/node@5.0
  android: circleci/android@2.3.0

jobs:
  eas_android_staging_build:
    resource_class: large
    docker:
      - image: cimg/android:2022.08-node

    steps:
      - checkout
      - node/install-packages:
          pkg-manager: yarn
      - run:
          name: Android build
          command: npx eas-cli build -p android --profile staging --local --non-interactive --clear-cache --output "./apk/android-staging-build.apk"

      - run:
          name: Upload to TestApp.io
          command: |
            export INSTALL_DIR=/tmp
            curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash
            $INSTALL_DIR/ta-cli publish --api_token=$TESTAPPIO_API_TOKEN --app_id=$TESTAPPIO_APP_ID --release="android" --apk=./apk/android-staging-build.apk --notify=true --git_release_notes=true --git_commit_id=true --source="Circle CI"

workflows:
  eas_android_staging_build:
    jobs:
      - eas_android_staging_build:
          filters:
            branches:
              only: staging

Feedback & Support

Developers built TestApp.io to solve the pain of app distribution for mobile app development teams.

Join our community for feedback and support.

Happy releasing 🎉