Skip to main content

Circle CI

Circle CI pipeline to upload both Android & iOS apps to TestApp.io to notify everyone for testing and feedback.

Updated over 2 months ago

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

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

Add two project environment variables:

Project SettingsEnvironment VariablesAdd Environment Variable

TESTAPPIO_API_TOKEN=
TESTAPPIO_APP_ID=

These values can be found in App → Integrations → Releases


iOS

Circle CI provides macOS executors for CI/CD pipelines and has Fastlane installed already, which means you don't need to install Fastlane in your pipeline.


Using Fastlane (Build & Upload)

If you haven't yet, set up 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.1orbs:
  ios: circleci/[email protected]:
  build-and-upload-ios:
    macos:
      xcode: "15.4" # Specify the Xcode version you need
    environment:
      release_notes: ""
      git_release_notes: true
      git_commit_id: false
      notify: true
    steps:
      - checkout      # Build and archive the iOS app
      - run:
          name: Archive iOS app
          command: |
            xcodebuild -workspace YourWorkspace.xcworkspace -scheme YourScheme -sdk iphoneos -configuration Release archive -archivePath build/YourApp.xcarchive      - run:
          name: Export IPA
          command: |
            xcodebuild -exportArchive -archivePath build/YourApp.xcarchive -exportPath build/ -exportOptionsPlist ExportOptions.plist      # 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="ios" --ipa=./build/YourApp.ipa --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, set up 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 your project directory and copy the below snippet.

version: 2.1orbs:
  android: circleci/[email protected]:
  build-and-upload:
    executor:
      name: android/android-machine
    environment:
      release_notes: ""
      git_release_notes: true
      git_commit_id: false
      notify: true
    steps:
      - checkout      # 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.

Tip: Once your CI/CD pipeline uploads a build, team members using the TestApp.io mobile app receive a push notification and can install the build with a single tap. You can also create share links to distribute builds to external testers and clients.


Need help? Contact us — we're happy to assist!

Did this answer your question?