Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/186-eas-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"mobile": patch
---

Clause-②: no
Metadata-protocol: none

EAS keeps the build numbers: `eas.json` sets `cli.appVersionSource` to
`remote`, so iOS `buildNumber` and Android `versionCode` live on EAS servers and
`production` builds increment them there. The first remote build seeds them from
the app config, which sets none, so they start from 1.

`eas-build.yml` builds each platform in its own job, so a failing iOS build no
longer stops the Android one. A push to `main` builds Android only; iOS builds
run by hand (`workflow_dispatch`) until the project has Apple signing
credentials.
49 changes: 42 additions & 7 deletions .github/workflows/eas-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,20 @@ on:
permissions:
contents: read

# One job per platform, so a failing iOS build cannot stop the Android one.
#
# EAS needs an account credential this repo can't provide by default. The secret
# can't be read in a job-level `if`, so each job mirrors it into an env var and
# guards each step — a job is a clean no-op (green) when it's unset.
jobs:
build:
name: EAS Build (${{ inputs.platform || 'all' }})
ios:
name: EAS Build iOS (${{ inputs.profile || 'preview' }})
# iOS runs on workflow_dispatch only (platform `ios` or `all`) until Apple
# signing credentials exist for the EAS project. To build iOS on every push
# to main as well, replace the `if:` line below with:
# if: ${{ github.event_name == 'push' || inputs.platform == 'ios' || inputs.platform == 'all' }}
if: ${{ github.event_name == 'workflow_dispatch' && (inputs.platform == 'ios' || inputs.platform == 'all') }}
runs-on: ubuntu-latest
# EAS needs an account credential this repo can't provide by default. The
# secret can't be read in a job-level `if`, so mirror it into an env var and
# guard each step — the job is a clean no-op (green) when it's unset.
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
steps:
Expand All @@ -56,8 +63,36 @@ jobs:
- run: pnpm install
if: ${{ env.EXPO_TOKEN != '' }}
- name: Build iOS
if: ${{ env.EXPO_TOKEN != '' && (inputs.platform == 'ios' || inputs.platform == 'all' || inputs.platform == '') }}
if: ${{ env.EXPO_TOKEN != '' }}
run: eas build --platform ios --profile ${{ inputs.profile || 'preview' }} --non-interactive

android:
name: EAS Build Android (${{ inputs.profile || 'preview' }})
# Every push to main builds Android with the `preview` profile; a
# workflow_dispatch builds it for platform `android` or `all`.
if: ${{ github.event_name == 'push' || inputs.platform == 'android' || inputs.platform == 'all' }}
runs-on: ubuntu-latest
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
steps:
- uses: actions/checkout@v4
if: ${{ env.EXPO_TOKEN != '' }}
- uses: pnpm/action-setup@v4
if: ${{ env.EXPO_TOKEN != '' }}
with:
version: 10
- uses: actions/setup-node@v4
if: ${{ env.EXPO_TOKEN != '' }}
with:
node-version: 22
cache: pnpm
- uses: expo/expo-github-action@v8
if: ${{ env.EXPO_TOKEN != '' }}
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: pnpm install
if: ${{ env.EXPO_TOKEN != '' }}
- name: Build Android
if: ${{ env.EXPO_TOKEN != '' && (inputs.platform == 'android' || inputs.platform == 'all' || inputs.platform == '') }}
if: ${{ env.EXPO_TOKEN != '' }}
run: eas build --platform android --profile ${{ inputs.profile || 'preview' }} --non-interactive
10 changes: 10 additions & 0 deletions docs/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,20 @@ eas submit --platform ios|android --profile production
The app builds under the EAS project `@objectstack/objectos`. `owner`, `slug` and
`extra.eas.projectId` in `app.config.ts` name it together.

Build numbers (iOS `buildNumber`, Android `versionCode`) live on EAS servers
(`cli.appVersionSource: "remote"` in `eas.json`), not in `app.config.ts`. A
`production` build increments them (`autoIncrement`); other profiles reuse the
latest. `eas build:version:get` reads them and `eas build:version:set` changes
them.

CI (`.github/workflows/`):

- `ci.yml` — Jest with coverage on every PR;
- `lint-typecheck.yml` — `tsc` + ESLint;
- `eas-build.yml` — a push to `main` builds Android with the `preview`
profile. iOS builds only when run by hand (`workflow_dispatch`, platform `ios`
or `all`) until the project has Apple signing credentials. Each platform is
its own job, so one failing does not stop the other;
- `eas-build.yml`, `eas-update.yml`, `eas-submit.yml` — need the `EXPO_TOKEN`
secret and are clean no-ops without it.

Expand Down
3 changes: 2 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cli": {
"version": ">= 14.0.0"
"version": ">= 14.0.0",
"appVersionSource": "remote"
},
"build": {
"development": {
Expand Down
Loading