buildshare.in
Frameworks

React Native & Expo

Distribute Android APK/AAB and iOS IPA builds from your React Native and Expo projects using BuildShare CLI.

React Native applications compile to native Android and iOS folders. If you're using Expo, you can build locally using Expo Application Services (EAS) or prebuild to native directories.


Typical Build Paths

Depending on how your compilation is configured, your compiled binaries will typically reside in:

  • Android APK: ./android/app/build/outputs/apk/release/app-release.apk
  • Android AAB: ./android/app/build/outputs/bundle/release/app-release.aab
  • iOS IPA: ./ios/build/Build/Products/Release-iphoneos/MyApp.ipa (or customized Xcode export path)

Automation Scripts

Once your project is linked with buildshare init (which automatically detects ./android/app/build/outputs/apk/release), add these scripts to your package.json:

{
  "scripts": {
    "build:android": "cd android && ./gradlew assembleRelease",
    "distribute:android": "npm run build:android && buildshare upload android --notes 'React Native Android release'",
    "distribute:ios": "buildshare upload ios --notes 'React Native iOS release'"
  }
}

If you prefer uploading directly without buildshare.json, pass the file path and --app <projectId>:

buildshare upload ./android/app/build/outputs/apk/release/app-release.apk --app <projectId>

Now you can distribute updates with simple npm scripts:

npm run distribute:android

GitHub Actions CI/CD Pipeline

To automate React Native Android builds and distribution on every push, configure .github/workflows/android-release.yml:

name: Android Release Build

on:
  push:
    branches:
      - main
      - master
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    environment: production 

    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: npm

      - name: Install Dependencies
        run: npm install

      - name: Setup Java
        uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 17

      - name: Grant Execute Permission
        run: chmod +x android/gradlew

      - name: Create local.properties
        run: |
          echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties

      - name: Setup Keystore
        run: |
          echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > android/app/my-upload-key.keystore

      - name: Build Release APK
        run: |
          cd android
          ./gradlew assembleRelease

      - name: Install BuildShare CLI
        run: |
          curl -fsSL https://raw.githubusercontent.com/vishalkumardev/cli/main/install.sh | sh
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"

      - name: Login into buildshare
        run: |
          buildshare login --token ${{ secrets.BUILDSHARE_TOKEN }}

      - name: Upload to BuildShare
        env:
          BUILDSHARE_TOKEN: ${{ secrets.BUILDSHARE_TOKEN }}
        run: |
          buildshare upload ./android/app/build/outputs/apk/release/app-release.apk \
            --app ${{ secrets.BUILDSHARE_PROJECT_ID }} \
            --notes "Sprint 42 test build"

For more options and setup details, see the GitHub Actions Guide.

On this page