Automatically upload mobile builds or register web apps with Autosana
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.
Add our MCP Server to help with setting up your CI/CD pipeline.
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:
Copy
Ask AI
- 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).
Important: Replace YOUR_BUNDLE_ID with your app’s bundle ID.
.github/workflows/autosana-eas-ios.yml
Copy
Ask AI
name: EAS iOS Simulator Build + Autosanaon: # 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
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.
- 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
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
Copy
Ask AI
name: Web App Testing with Autosanaon: 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.
If you have a static staging URL or custom deployment:
.github/workflows/autosana-web-custom.yml
Copy
Ask AI
name: Web App Testing with Autosanaon: push: branches: [ main ]jobs: test: runs-on: ubuntu-latest steps: - name: Register with Autosana uses: autosana/autosana-ci@main with: api-key: ${{ secrets.AUTOSANA_KEY }} platform: web app-id: my-staging-app url: https://staging.myapp.com # suite-ids: uuid1,uuid2 # Optional: trigger suites after upload # flow-ids: uuid1,uuid2 # Optional: or specify individual flows
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.
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.
Copy
Ask AI
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 any4. 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 configuredCreate 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 Uploadon: 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 pathImportant 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 buildsFinally, 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.