Files
territory-log/BUILDING.md
root 6a4ee9e80f
Some checks are pending
Build (EAS) / EAS Build (Android Preview APK) (push) Waiting to run
feat: add CI/CD workflows and EAS build config (Sprint 5)
2026-02-19 22:10:26 +08:00

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:

  1. Generate an Expo access token:

  2. 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"
  3. The build.yml workflow will now authenticate automatically when triggered by a push to main.


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