# Github Actions (Expo EAS)

Source: https://help.testapp.io/github-actions-expo-eas/

Set up Expo (EAS) with [GitHub Actions](https://help.testapp.io/github-action/) to upload your Android (APK) and iOS (IPA) to [TestApp.io](https://testapp.io/) for testing and feedback.

**The following environment variables need to be set:**

- [TESTAPPIO_API_TOKEN](https://portal.testapp.io/profile/tokens)
- [TESTAPPIO_APP_ID](https://portal.testapp.io/apps)

---

## iOS

```yaml
name: Upload IPA to TestApp.io
on:
  workflow_dispatch:

jobs:
  ios:
    runs-on: macos-latest
    steps:
      - name: 🏗 Setup repo
        uses: actions/checkout@v3

      - name: 🏗 Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18.x
          cache: yarn

      - name: 🏗 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🚀 Build app
        run: eas build -p ios --profile staging --local --non-interactive --clear-cache --output "./ipa/ios-staging-build.ipa"
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

      - name: 🌐 Upload IPA to TestApp.io
        uses: testappio/github-action@v5
        with:
          api_token: ${{ secrets.TESTAPPIO_API_TOKEN }}
          app_id: ${{ secrets.TESTAPPIO_APP_ID }}
          file: ./ipa/ios-staging-build.ipa
          release_notes: ''
          git_release_notes: true
          include_git_commit_id: true
          notify: true
```

---

## Android

```yaml
name: Upload APK to TestApp.io
on:
  workflow_dispatch:

jobs:
  android:
    runs-on: ubuntu-latest
    steps:
      - name: 🏗 Setup repo
        uses: actions/checkout@v3

      - name: 🏗 Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18.x
          cache: yarn

      - name: 🏗 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: 📦 Install dependencies
        run: yarn install

      - name: 🚀 Build app
        run: eas build -p android --profile staging --local --non-interactive --clear-cache --output "./apk/android-staging-build.apk"
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

      - name: 🌐 Upload APK to TestApp.io
        uses: testappio/github-action@v5
        with:
          api_token: ${{secrets.TESTAPPIO_API_TOKEN}}
          app_id: ${{secrets.TESTAPPIO_APP_ID}}
          file: ./apk/android-staging-build.apk
          release_notes: ""
          git_release_notes: true
          include_git_commit_id: true
          notify: true
```

---

#### Related Setup Guides

- [GitHub Actions Setup](https://help.testapp.io/github-action/)

---

Need help? [Contact us](https://testapp.io/contact-us/). we're happy to assist!
