2.9 KiB
Building TerritoryLog with EAS
This document explains how to build TerritoryLog APKs and production bundles using Expo Application Services (EAS).
Prerequisites
1. Install EAS CLI
npm install -g eas-cli
Verify installation:
eas --version
# Should output >= 12.0.0
2. Log in to Expo Account
eas login
You will be prompted for your Expo username and password. If you don't have an account, create one at https://expo.dev.
Building
Preview Build (APK — for internal testing)
This generates a standard .apk file that can be installed directly on Android devices without the Play Store.
eas build --platform android --profile preview
Once the build completes, EAS will provide a download URL for the APK.
Production Build (AAB — for Play Store submission)
This generates an .aab (Android App Bundle) optimized for Play Store distribution.
eas build --platform android --profile production
Development Build (for local development with Expo Go replacement)
eas build --platform android --profile development
About Keystores
EAS manages keystores automatically. On your first build, EAS will generate and securely store a keystore on Expo's servers. You don't need to manually create or manage a keystore. If you need to use an existing keystore, see the EAS credentials documentation.
CI/CD — Setting Up EXPO_TOKEN in Gitea
The CI/CD pipeline in .gitea/workflows/build.yml requires an EXPO_TOKEN secret to authenticate with EAS without interactive login.
Steps to set up:
-
Generate an Expo access token:
- Go to https://expo.dev/accounts/[your-username]/settings/access-tokens
- Click "Create Token"
- Name it something like
gitea-ciand copy the token value
-
Add the secret to Gitea:
- In this repo, go to Settings → Actions → Secrets
- Click "Add Secret"
- Name:
EXPO_TOKEN - Value: (paste your token)
- Click "Save"
-
The
build.ymlworkflow will now authenticate automatically when triggered by a push tomain.
Build Profiles Summary
| Profile | Output | Distribution | Use Case |
|---|---|---|---|
development |
APK | Internal | Dev client for local testing |
preview |
APK | Internal | QA / internal testing |
production |
AAB | Play Store | Public release |