💡
BETA mode. Your feedback is highly appreciated!

Circle CI pipeline allows you to build and upload both Android & iOS apps to TestApp.io to notify your testers for testing and feedback.

Configuration

Key Description Env Var(s) Default
api_token You can get it from https://portal.testapp.io/settings/api-credentials TESTAPPIO_API_TOKEN
app_id You can get it from your app page at https://portal.testapp.io/apps TESTAPPIO_APP_ID
release It can be either both or Android or iOS TESTAPPIO_RELEASE
apk Path to the Android APK file TESTAPPIO_ANDROID_PATH
ipa Path to the iOS IPA file TESTAPPIO_IOS_PATH
release_notes Manually add the release notes to be displayed for the testers TESTAPPIO_RELEASE_NOTES
git_release_notes Collect release notes from the latest git commit message to be displayed for the testers: true or false TESTAPPIO_GIT_RELEASE_NOTES true
git_commit_id Include the last commit ID in the release notes (works with both release notes options): true or false TESTAPPIO_GIT_COMMIT_ID false
notify Send notifications to your team members about this release: true or false TESTAPPIO_NOTIFY false

Check TA-CLI for more info


Setup Circle CI project

Setup two project environment variables as below.

Project Settings->Environment Variables->Add Environment Variable

TESTAPPIO_API_TOKEN=
TESTAPPIO_APP_ID=

These values can be found in App -> Integrations -> Releases


iOS

Circle CI provides macOS executors to CI/CD pipeline, and it has Fastlane installed already, which means we don't need to install Fastlane in our pipeline.

Using Fastlane (Build & Upload)

If you haven't yet, you would need to setup the fastlane and add the TestApp.io plugin.

fastlane add_plugin testappio

In Circle CI's config.yml, add bundle install, e.g.

# ...
    steps:
      # ...
      - run: bundle install
      - run: bundle exec fastlane adhoc --verbose
# ...

Make sure that the codesign is configured to "manual" or the gym step of the Circle CI pipeline would fail with the error "no provisioning profile found"

Circle CI will build your project and upload your IPA file to TestApp.io for distribution 🎉

Without Fastlane

version: 2.1

orbs:
  ios: circleci/[email protected] # Ensure you're using the appropriate version of the iOS orb

jobs:
  build-and-upload-ios:
    macos:
      xcode: "13.4.1" # Specify the Xcode version you need
    environment: # You can change the following
      release_notes: ""
      git_release_notes: true
      git_commit_id: false
      notify: true
    steps:
      - checkout

      # Uncomment one of the following lines depending on whether you want a debug or release build.
      # For a debug build:
      - run:
          name: Assemble debug build
          command: |
            xcodebuild -workspace YourWorkspace.xcworkspace -scheme YourScheme -sdk iphoneos -configuration Debug build

      # For a release build:
      # - run:
      #     name: Assemble release build
      #     command: |
      #       xcodebuild -workspace YourWorkspace.xcworkspace -scheme YourScheme -sdk iphoneos -configuration Release build

      # Upload to TestApp.io
      - 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=./app/build/outputs/apk/debug/app-debug.apk --release_notes=$release_notes --notify=$notify --git_release_notes=$git_release_notes --git_commit_id=$git_commit_id --source="Circle CI"

workflows:
  default:
    jobs:
      - build-and-upload-ios

Android

Using Fastlane (Build & Upload)

If you haven't yet, you would need to setup the fastlane and add the TestApp.io plugin.

fastlane add_plugin testappio

In Circle CI's config.yml

# ...
    steps:
      # ...
      - run: bundle install
      - run: bundle exec fastlane android beta --verbose
# ...


Without Fastlane

Create .circleci/config.yml file under to project directory and copy the below snippet.

version: 2.1

orbs:
  android: circleci/[email protected]

jobs:
  build-and-upload:
    executor:
      name: android/android-machine
    environment: # You can change the following
      release_notes: ""
      git_release_notes: true
      git_commit_id: false
      notify: true
    steps:
      # Checkout the code as the first step.
      - checkout

      # Uncomment one of the following lines depending on whether you want a debug or release build.
      # For a debug build:
      - run:
          name: Assemble debug build
          command: |
            ./gradlew assembleDebug

      # For a release build:
      # - run:
      #     name: Assemble release build
      #     command: |
      #       ./gradlew assembleRelease

      - 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=./app/build/outputs/apk/debug/app-debug.apk --release_notes=$release_notes --notify=$notify --git_release_notes=$git_release_notes --git_commit_id=$git_commit_id --source="Circle CI"

workflows:
  default:
    jobs:
      - build-and-upload

If you already have the .circleci/config.yml file, you could copy the build-and-upload job to your pipeline.


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 🎉