Skip to main content
Integrate Autosana into your CI/CD pipeline with our GitHub Action to automatically upload and test your builds with every commit. Supports iOS, Android, and web platforms.
Autosana GitHub Action uploading a build
Add our MCP Server to help with setting up your CI/CD pipeline.

Step 1: Choose Your Platform

Select your platform to see the relevant setup instructions:

iOS / Android

Mobile app builds (Expo, Fastlane, native)

Web

Web apps (Vercel, Netlify, custom deployments, etc.)

Mobile Setup

Choose Your Build Tool

Expo EAS

React Native with Expo’s build service

Fastlane

Native iOS/Android builds with Fastlane

Other

Gradle, Flutter, or custom builds

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 Settings → Integrations.

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
    # environment: staging  # Optional: separate apps by environment
    # suite-ids: uuid1,uuid2  # Optional: trigger suites after upload
    # flow-ids: uuid1,uuid2  # Optional: or specify individual flows
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
Optional Parameters:
  • name: Display name for your app (e.g., “My iOS App”). Updates existing app name if different.
  • environment: Name of the environment to associate this app with (e.g., staging, production). See Using Environments below.
  • suite-ids: Comma-separated suite UUIDs to run after upload (e.g., uuid1,uuid2).
  • flow-ids: Comma-separated flow UUIDs to run after upload (e.g., uuid1,uuid2).

Github Action Workflow Examples

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
          # suite-ids: uuid1,uuid2  # Optional: trigger suites after upload
          # flow-ids: uuid1,uuid2  # Optional: or specify individual flows

Web Setup

For web applications, you can register a URL (such as a preview deployment) for testing. This is useful for testing Vercel, Netlify, or other preview deployments on every PR.

Parameters

Required Parameters for Web:
  • api-key: Your Autosana API key (from secrets)
  • platform: Must be web
  • app-id: A unique identifier for your web app (lowercase, alphanumeric with hyphens, e.g., my-web-app)
  • url: The URL to test (e.g., your preview deployment URL)
Optional Parameters:
  • name: Display name for your web app (e.g., “My Web App”). Updates existing app name if different.
  • environment: Name of the environment to associate this app with (e.g., staging, production). See Using Environments below.
  • suite-ids: Comma-separated suite UUIDs to run after upload (e.g., uuid1,uuid2).
  • flow-ids: Comma-separated flow UUIDs to run after upload (e.g., uuid1,uuid2).

Basic Usage

- name: Register Web App with Autosana
  uses: autosana/autosana-ci@main
  with:
    api-key: ${{ secrets.AUTOSANA_KEY }}
    platform: web
    app-id: my-web-app
    url: https://my-app-preview.vercel.app
    name: My Web App  # Optional: display name for the app
    # suite-ids: uuid1,uuid2  # Optional: trigger suites after upload
    # flow-ids: uuid1,uuid2  # Optional: or specify individual flows

Web Workflow Examples

For Vercel deployments using the GitHub integration (OAuth), use the wait-for-vercel-preview action to get the preview URL:
.github/workflows/autosana-web-vercel.yml
name: Web App Testing with Autosana

on:
  pull_request:
    branches: [ main ]

jobs:
  test-preview:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      deployments: read

    steps:
      - name: Wait for Vercel Preview
        uses: patrickedqvist/wait-for-vercel-preview@v1.3.2
        id: vercel
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          max_timeout: 600

      - name: Register with Autosana
        uses: autosana/autosana-ci@main
        with:
          api-key: ${{ secrets.AUTOSANA_KEY }}
          platform: web
          app-id: my-web-app  # Choose a unique identifier for your app
          url: ${{ steps.vercel.outputs.url }}
          # suite-ids: uuid1,uuid2  # Optional: trigger suites after upload
          # flow-ids: uuid1,uuid2  # Optional: or specify individual flows
The wait-for-vercel-preview action requires the permissions block shown above to access deployment information. Without these permissions, you may see “Resource not accessible by integration” errors.
The app-id must be lowercase alphanumeric with hyphens only (e.g., my-web-app, staging, preview-app-123). This identifier is used to track your web app across deployments.

Step 4: What Happens Next?

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

Run flows directly (optional)

Add suite-ids or flow-ids to your action config to trigger flows immediately after upload. The action will wait for all flows to complete and report results inline — failing the job if any flows fail.
2

Configure automations

Alternatively (or additionally), set when flows run in your Automations page to run flows on a schedule or trigger.
3

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

App Build Guide

Learn how to build your app for our cloud

GitHub Action

View the source code and documentation for our GitHub Action

Get Your API Key

Copy your API key from Settings → Integrations