authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-15 14:43:41-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-15 14:43:41-07:00
loge6ae764f47d678b96f4a1b2c8c76eedf1a342e26
tree0befc92d6d68ab740d563f82247dab23cf05ed02
parent719a76ca1dbf5490f1aa33ffb9966301e02be9a9
signature Signed by PGP key B5690EEEBB952194

feat(mobile): add v2 preview store builds (#11966)


2 files changed, 47 insertions(+), 3 deletions(-)

.github/workflows/mobile-eas-production.yml+32-3
...@@ -24,6 +24,8 @@ name: Mobile EAS Production...@@ -24,6 +24,8 @@ name: Mobile EAS Production
24# into the void.24# into the void.
25# workflow_dispatch remains as a manual override for both modes (e.g. to25# workflow_dispatch remains as a manual override for both modes (e.g. to
26# retry an errored build or force an OTA).26# retry an errored build or force an OTA).
27# Manual v2-preview builds keep the production app identity and disable OTA.
28# Select the v2 branch when dispatching a preview build.
27on:29on:
28 workflow_dispatch:30 workflow_dispatch:
29 inputs:31 inputs:
...@@ -35,6 +37,14 @@ on:...@@ -35,6 +37,14 @@ on:
35 options:37 options:
36 - build38 - build
37 - update39 - update
40 profile:
41 description: "Store build profile (v2-preview supports build mode only)"
42 required: true
43 type: choice
44 default: production
45 options:
46 - production
47 - v2-preview
38 platform:48 platform:
39 description: "Target platform"49 description: "Target platform"
40 required: true50 required: true
...@@ -75,7 +85,7 @@ concurrency:...@@ -75,7 +85,7 @@ concurrency:
7585
76jobs:86jobs:
77 production:87 production:
78 name: EAS Production ${{ github.event_name == 'push' && 'auto' || inputs.mode }}88 name: EAS ${{ inputs.profile || 'production' }} ${{ github.event_name == 'push' && 'auto' || inputs.mode }}
79 runs-on: blacksmith-8vcpu-ubuntu-240489 runs-on: blacksmith-8vcpu-ubuntu-2404
80 permissions:90 permissions:
81 contents: read91 contents: read
...@@ -83,6 +93,12 @@ jobs:...@@ -83,6 +93,12 @@ jobs:
83 APP_VARIANT: production93 APP_VARIANT: production
84 NODE_OPTIONS: --max-old-space-size=819294 NODE_OPTIONS: --max-old-space-size=8192
85 steps:95 steps:
96 - name: Reject preview OTA updates
97 if: github.event_name == 'workflow_dispatch' && inputs.profile == 'v2-preview' && inputs.mode == 'update'
98 run: |
99 echo "::error::V2 previews use store builds only. Select mode=build."
100 exit 1
101
86 - id: expo-token102 - id: expo-token
87 name: Check for EXPO_TOKEN103 name: Check for EXPO_TOKEN
88 env:104 env:
...@@ -125,6 +141,16 @@ jobs:...@@ -125,6 +141,16 @@ jobs:
125 args:141 args:
126 - --filter=@t3tools/mobile...142 - --filter=@t3tools/mobile...
127143
144 - name: Verify v2 preview source
145 if: steps.expo-token.outputs.present == 'true' && github.event_name == 'workflow_dispatch' && inputs.profile == 'v2-preview'
146 run: |
147 node --input-type=module -e '
148 import * as environment from "./packages/contracts/src/environment.ts";
149 if (environment.ORCHESTRATION_PROTOCOL_VERSION !== 2) {
150 throw new Error("V2 previews require a v2 source branch. Select the v2 branch when running this workflow.");
151 }
152 '
153
128 - name: Expose pnpm154 - name: Expose pnpm
129 if: steps.expo-token.outputs.present == 'true'155 if: steps.expo-token.outputs.present == 'true'
130 run: |156 run: |
...@@ -199,10 +225,12 @@ jobs:...@@ -199,10 +225,12 @@ jobs:
199 - name: Summarize manual build version225 - name: Summarize manual build version
200 if: steps.expo-token.outputs.present == 'true' && github.event_name == 'workflow_dispatch' && inputs.mode == 'build'226 if: steps.expo-token.outputs.present == 'true' && github.event_name == 'workflow_dispatch' && inputs.mode == 'build'
201 working-directory: apps/mobile227 working-directory: apps/mobile
228 env:
229 MOBILE_BUILD_PROFILE: ${{ inputs.profile || 'production' }}
202 run: |230 run: |
203 version="$(npx expo config --json --type public | jq -r '.version')"231 version="$(npx expo config --json --type public | jq -r '.version')"
204 {232 {
205 echo "## Manual production build"233 echo "## Manual $MOBILE_BUILD_PROFILE build"
206 echo234 echo
207 echo "- App version: \`$version\`"235 echo "- App version: \`$version\`"
208 echo "- Platform: \`${{ inputs.platform }}\`"236 echo "- Platform: \`${{ inputs.platform }}\`"
...@@ -215,7 +243,8 @@ jobs:...@@ -215,7 +243,8 @@ jobs:
215 working-directory: apps/mobile243 working-directory: apps/mobile
216 env:244 env:
217 EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}245 EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
218 run: eas build --platform ${{ inputs.platform }} --profile production --auto-submit --non-interactive --no-wait246 MOBILE_BUILD_PROFILE: ${{ inputs.profile || 'production' }}
247 run: eas build --platform ${{ inputs.platform }} --profile "$MOBILE_BUILD_PROFILE" --auto-submit --non-interactive --no-wait
219248
220 - name: Publish OTA update (manual)249 - name: Publish OTA update (manual)
221 if: steps.expo-token.outputs.present == 'true' && github.event_name == 'workflow_dispatch' && inputs.mode == 'update'250 if: steps.expo-token.outputs.present == 'true' && github.event_name == 'workflow_dispatch' && inputs.mode == 'update'
apps/mobile/eas.json+15
...@@ -40,6 +40,14 @@...@@ -40,6 +40,14 @@
40 "buildType": "apk"40 "buildType": "apk"
41 }41 }
42 },42 },
43 "v2-preview": {
44 "extends": "production",
45 "distribution": "store",
46 "channel": "v2-preview",
47 "env": {
48 "T3CODE_MOBILE_UPDATES_ENABLED": "0"
49 }
50 },
43 "production": {51 "production": {
44 "corepack": true,52 "corepack": true,
45 "env": {53 "env": {
...@@ -52,6 +60,13 @@...@@ -52,6 +60,13 @@
52 }60 }
53 },61 },
54 "submit": {62 "submit": {
63 "v2-preview": {
64 "extends": "production",
65 "android": {
66 "track": "alpha",
67 "releaseStatus": "completed"
68 }
69 },
55 "production": {70 "production": {
56 "ios": {71 "ios": {
57 "ascAppId": "6787819824"72 "ascAppId": "6787819824"