Skip to main content
Integrate Autosana into your CI/CD pipeline with our CI/CD integration to automatically test your mobile app with every commit.
Add our MCP Server to help with setting up your CI/CD pipeline.

Step 1: Choose Your Build Tool

Select the build tool that matches your project:

Step 2: Set Secrets

Go to your repository Settings → Secrets → Actions and add these secrets. See the GitHub Secrets docs for help.

Required for All

AUTOSANA_KEY
string
required
Your Autosana API key for uploading builds. Get it from your Settings page.

Required for Expo EAS

EXPO_TOKEN
string
Your Expo access token for EAS builds. Get it from Expo account settings.

Step 3: Set up your Github Workflow with the Autosana Github Action

Create a .github/workflows/autosana-ios.yml and/or .github/workflows/autosana-android.yml file in your repository. Examples are provided below to get started.
For more specific build instructions by framework, check out our App Build Guide for detailed instructions on creating builds for iOS and Android.
Add this step to your existing GitHub workflow after your build step:
- name: Upload to Autosana
  uses: autosana/autosana-ci@main
  with:
    api-key: ${{ secrets.AUTOSANA_KEY }}
    bundle-id: com.your.app  # Replace with your app's bundle ID
    platform: ios  # or 'android'
    build-path: ./path/to/your/build.app  # iOS: .app or .zip | Android: .apk
Required Parameters:
  • api-key: Your Autosana API key (from secrets)
  • bundle-id: Your app’s bundle ID (e.g., com.company.app)
  • platform: Either ios or android
  • build-path: Path to your build artifact

Github Action Workflow Examples

  • Expo EAS (iOS)
  • Expo EAS (Android)
  • Fastlane (iOS)
  • Fastlane (Android)
  • Native iOS
  • Native Android

Configure eas.json

Add this profile to your eas.json for iOS simulator builds:
eas.json
{
  "build": {
    "preview-simulator": {
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    }
  }
}

GitHub Workflow

Important: Replace YOUR_BUNDLE_ID with your app’s bundle ID.
.github/workflows/autosana-eas-ios.yml
name: EAS iOS Simulator Build + Autosana

on:
  # Triggers on pushes to main branch (including merges)
  push:
    branches:
      - main
  # Allows for manual triggering of the workflow from the GitHub UI.
  workflow_dispatch:

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    steps:
      # Step 1: Check out the repository's code
      - name: Checkout repository
        uses: actions/checkout@v4

      # Step 2: Set up Node.js
      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'
          cache: 'npm'

      # Step 3: Set up Expo and EAS
      - name: Set up Expo and EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      # Step 4: Install project dependencies
      - name: Install dependencies
        run: npm install

      # Step 5: Run the EAS Build for an iOS Simulator
      - name: Run iOS Simulator Build
        run: eas build --platform ios --profile preview-simulator --non-interactive --wait --json > build-info.json

      # Step 6: Download the .app artifact from the completed EAS build
      - name: Download zipped .app from EAS
        run: |
          BUILD_URL=$(jq -r '.[0].artifacts.buildUrl' build-info.json)
          echo "Downloading zipped .app from $BUILD_URL"
          curl -L "$BUILD_URL" -o app.zip

      # Step 7: Run the Autosana CI action for testing
      - name: Run Autosana CI
        uses: autosana/autosana-ci@main
        with:
          api-key: ${{ secrets.AUTOSANA_KEY }}
          bundle-id: YOUR_BUNDLE_ID # TODO: Make sure this matches your app's bundle ID
          platform: ios
          build-path: app.zip

Step 4: What Happens Next?

Once you’ve set up our CI/CD integration:
1

Configure automations

Set when flows run in your Automations page to run flows on a schedule or trigger
2

View test results

Check your test runs in the Runs page

Need Help Setting Up?

If you’re using Claude Code or another AI agent, you can add our MCP server to help automate the setup process. The MCP server can:
  • Set up your CI/CD pipeline automatically
  • Build your app for iOS or Android
  • Find your app’s bundle ID
  • And more!
Learn more at our MCP Server documentation.

Instructions for AI Agents Using the Autosana MCP (humans, you can ignore this!)

If you are an AI agent (such as Claude Code, Cline, or Cursor) using the Autosana MCP server to help set up CI/CD workflows, use the following prompt to guide your workflow generation.
Scan the repo to understand the project and how it is built. You should determine things like:
1. The project type (react-native, flutter, android-native, ios-native, etc)
2. Supported platforms (android, ios, or both)
3. Existing Github workflow files, if any
4. The correct build commands and configurations, indicated by the presence of Fastlane, EAS, etc... It can also help to look for .md files that explain the build process.
5. Available environments (development, staging, production, etc) and how they are configured

Create a plan for how to build the app. Then, generate a complete autosana-ios.yml and autosana-android.yml (whatever platforms are applicable) file, in .github/workflows. Use the best approach for the project (Fastlane, EAS, native, etc).

Unless specified otherwise by the user, the file(s) should start with the following:
name: Autosana (platform) App Upload
on:
  workflow_dispatch:
  push:
    branches:
      - (primary branch)
  pull_request:
    branches:
      - (primary branch)

The file MUST contain the following Autosana Github Actions script at the end:
- uses: autosana/autosana-ci@main
  with:
    api-key: ${{ secrets.AUTOSANA_KEY }}
    bundle-id: com.example.app # TODO: Replace with your bundle ID
    platform: ios/android
    build-path: ./build/MyApp.app # TODO: Replace with your build path

Important requirements:
- For Android, always target universal APK architecture for emulator compatibility
- For iOS, always build for simulator, not physical device
- Include actual paths based on common conventions for the detected framework
- Prefer the staging environment, if available (and not specified otherwise by the user)
- For EAS iOS builds, you can use a linux runner if doing cloud builds

Finally, once implemented, thoroughly review the script(s) to ensure it is correct before it's run.
It is critical that the script(s) will run successfully.

Helpful Resources