Skip to content

Commit a99f3d6

Browse files
yyq1025claude
andcommitted
ci: GitHub Actions iOS build + submit via eas build --local
EAS cloud `eas build` fails on sharp's source-build during pnpm install (the worker doesn't pick up sharp's prebuilt; supportedArchitectures didn't help). A free macOS runner on a public repo replicates the working local flow: an Apple-Silicon runner finds sharp's arm64 prebuilt (like a dev Mac), and a fresh VM has no shared Metro cache to go stale. Manual trigger, optional TestFlight submit. Requires the EXPO_TOKEN repo secret; signing credentials + the ASC API key stay EAS-managed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d1d8f87 commit a99f3d6

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/ios-build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: iOS build + submit
2+
3+
# Builds the iOS app on a free macOS runner (free for public repos) via
4+
# `eas build --local`. This replicates the working local build flow — EAS's own
5+
# cloud `eas build` currently fails on sharp's source-build during pnpm install,
6+
# but a fresh Apple-Silicon runner finds sharp's arm64 prebuilt (like a dev Mac)
7+
# and has no shared Metro cache to go stale. Optionally submits to TestFlight.
8+
#
9+
# Required secret: EXPO_TOKEN (expo.dev > Account settings > Access tokens).
10+
# It authenticates EAS, pulls the EAS-managed iOS signing credentials, reads the
11+
# remote build number (appVersionSource: remote), and authorizes submit.
12+
# Signing certs/profiles + the App Store Connect API key live in EAS, not here.
13+
on:
14+
workflow_dispatch:
15+
inputs:
16+
submit:
17+
description: Submit the build to TestFlight after building
18+
type: boolean
19+
default: false
20+
21+
jobs:
22+
ios:
23+
runs-on: macos-latest # standard Apple-Silicon runner — free for public repos
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
# iOS deploymentTarget 26 needs a matching Xcode.
28+
- uses: maxim-lobanov/setup-xcode@v1
29+
with:
30+
xcode-version: latest-stable
31+
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: 24
35+
36+
- run: corepack enable
37+
38+
- name: Resolve pnpm store dir
39+
run: echo "PNPM_STORE=$(pnpm store path --silent)" >> "$GITHUB_ENV"
40+
41+
- uses: actions/cache@v4
42+
with:
43+
path: ${{ env.PNPM_STORE }}
44+
key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
45+
restore-keys: pnpm-${{ runner.os }}-
46+
47+
- run: pnpm install --frozen-lockfile
48+
49+
- run: npm install -g eas-cli
50+
51+
- name: Build .ipa (eas build --local)
52+
working-directory: packages/app
53+
env:
54+
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
55+
run: eas build --local --non-interactive --platform ios --profile production --output "${{ runner.temp }}/sidecode.ipa"
56+
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: sidecode-ios-ipa
60+
path: ${{ runner.temp }}/sidecode.ipa
61+
if-no-files-found: error
62+
63+
- name: Submit to TestFlight
64+
if: inputs.submit
65+
working-directory: packages/app
66+
env:
67+
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
68+
run: eas submit --non-interactive --platform ios --profile production --path "${{ runner.temp }}/sidecode.ipa"

0 commit comments

Comments
 (0)