Skip to content

fix(clients): a running session shows Working only while a turn is active #405

fix(clients): a running session shows Working only while a turn is active

fix(clients): a running session shows Working only while a turn is active #405

name: Mobile EAS Preview
on:
pull_request:
types: [opened, reopened, synchronize, labeled]
jobs:
preview:
name: EAS Preview
if: |
contains(github.event.pull_request.labels.*.name, '🚀 Mobile Continuous Deployment') &&
(github.event.action != 'labeled' || github.event.label.name == '🚀 Mobile Continuous Deployment')
runs-on: ubuntu-24.04
concurrency:
group: mobile-eas-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
APP_VARIANT: preview
NODE_OPTIONS: --max-old-space-size=8192
MOBILE_VERSION_POLICY: fingerprint
# app.config.ts reads these to build `extra.eas.projectId`, and eas-cli
# resolves the project from it. They otherwise live only in a gitignored
# .env.local, so without them here every eas command fails with "EAS
# project not configured".
PYLON_EAS_PROJECT_ID: ${{ vars.PYLON_EAS_PROJECT_ID }}
PYLON_EAS_OWNER: ${{ vars.PYLON_EAS_OWNER }}
steps:
- id: expo-token
name: Check for EXPO_TOKEN
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: |
if [ -n "$EXPO_TOKEN" ]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
echo "EXPO_TOKEN is not available; skipping EAS preview."
fi
- name: Checkout
if: steps.expo-token.outputs.present == 'true'
uses: actions/checkout@v6
with:
fetch-depth: 0
# No sparse-checkout here: it makes actions/checkout fetch with
# --filter=blob:none, and eas-cli archives the project via
# `git clone --depth 1 file://<workspace>`, which fails (exit 128)
# when the partial clone can't serve the unfetched blobs.
- name: Setup Vite+
if: steps.expo-token.outputs.present == 'true'
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: |
args:
- --filter=@t3tools/mobile...
- name: Expose pnpm
if: steps.expo-token.outputs.present == 'true'
run: |
pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")"
vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin"
echo "$vp_pnpm_bin" >> "$GITHUB_PATH"
"$vp_pnpm_bin/pnpm" --version
- name: Setup EAS
if: steps.expo-token.outputs.present == 'true'
uses: expo/expo-github-action@v8
with:
# Pinned below eas-cli 22 for continuous-deploy-fingerprint, which still
# reads `build.project.ownerAccount` when it posts the PR comment. eas-cli
# 22 renamed those build JSON fields (project → app, channel →
# updateChannel, runtimeVersion → runtime), so `project` is undefined and
# the step fails after the builds have already succeeded.
# See https://github.com/expo/expo-github-action/issues/358 — raise this
# back to `latest` once that issue closes. The production workflow stays
# on `latest` because it calls eas directly and never runs this action.
eas-version: 21.8.0
token: ${{ secrets.EXPO_TOKEN }}
# npm, not pnpm: this only installs eas-cli into the action's own
# tool dir, and pnpm 11 hard-fails that install on dtrace-provider's
# ignored build script (no allowBuilds config outside the repo).
packager: npm
- name: Pull preview environment variables
if: steps.expo-token.outputs.present == 'true'
working-directory: apps/mobile
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: eas env:pull preview --non-interactive
# The preview environment is a mirror; the production workflow refreshes it
# from the GitHub `production` environment. Fail here rather than hand a
# reviewer a build whose Connect surfaces are silently missing.
- name: Verify Connect config reaches the app manifest
if: steps.expo-token.outputs.present == 'true'
run: node scripts/verify-mobile-connect-config.ts
- name: Deploy with fingerprint check
if: steps.expo-token.outputs.present == 'true'
# Pinned to a release rather than @main: this is the only action reference
# in the repository that tracked an unreleased branch, so it could change
# under CI without a commit here. The sub-action does not exist in v8, which
# is why the setup action above is a different major.
uses: expo/expo-github-action/continuous-deploy-fingerprint@v9
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
with:
profile: preview:dev
branch: pr-${{ github.event.pull_request.number }}
platform: all
environment: preview
working-directory: apps/mobile
github-token: ${{ secrets.GITHUB_TOKEN }}