TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

Setup a publish, build and distribute pipeline for Expo based React Native project

June 29, 2020

Ziel

Expo App automatisch bauen und verteilen (Android/iOS) mit Bitbucket Pipelines.

Empfehlung (2024)

Expo Classic + Turtle sind legacy. Nutze EAS Build.

Voraussetzungen

  • EAS Account (Expo)
  • eas.json im Repo
  • Secrets in Bitbucket (EAS Token, keystore, etc.)

Basis: EAS CLI

code
npm i -g eas-cli
eas login
eas build:configure

Beispiel eas.json

code
{
  "build": {
    "staging": {
      "distribution": "internal",
      "env": {
        "APP_ENV": "staging"
      }
    },
    "production": {
      "distribution": "store",
      "env": {
        "APP_ENV": "prod"
      }
    }
  }
}

Bitbucket Pipeline (minimal)

code
image: node:18

pipelines:
  default:
    - step:
        name: EAS Build Android
        caches:
          - node
        script:
          - npm ci
          - npx eas-cli login --token $EXPO_TOKEN
          - npx eas build -p android --profile staging --non-interactive

Secrets in Bitbucket

Wichtige Variablen:

  • EXPO_TOKEN (Expo Access Token)
  • APP_ENV oder profile-spezifische Variablen

Android Keystore und iOS Credentials managed EAS in der Regel selbst, solange du eas credentials nutzt.

Distribution

  • distribution: internal fuer Tester
  • distribution: store fuer Play/App Store

Links