-
Notifications
You must be signed in to change notification settings - Fork 6
108 lines (90 loc) · 2.76 KB
/
Copy pathmobile.yml
File metadata and controls
108 lines (90 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Mobile
on:
push:
branches: [main]
paths:
- 'apps/mobile/**'
- '.github/workflows/mobile.yml'
- '.nvmrc'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
pull_request:
paths:
- 'apps/mobile/**'
- '.github/workflows/mobile.yml'
- '.nvmrc'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
# EAS cloud builds / store submits are manual so they don't burn build
# credits on every push. Trigger from the Actions tab → "Run workflow".
workflow_dispatch:
inputs:
platform:
description: 'EAS build platform'
type: choice
options: [android, ios, all]
default: android
profile:
description: 'EAS build profile (see apps/mobile/eas.json)'
type: choice
options: [preview, production, development]
default: preview
submit:
description: 'Submit the build to the store after it finishes'
type: boolean
default: false
permissions:
contents: read
defaults:
run:
working-directory: apps/mobile
jobs:
# Fast, free check on every push/PR: typecheck, lint, test, and prove both JS
# bundles build via `expo export` (no device, no EAS minutes).
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install
working-directory: .
run: pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
- name: Bundle (expo export)
run: pnpm export
# Cloud build + optional store submit via EAS. Requires the EXPO_TOKEN repo
# secret (Expo account access token). iOS/Android signing credentials are
# managed by EAS (`eas credentials`) — not stored here.
eas-build:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install
working-directory: .
run: pnpm install --frozen-lockfile
- uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: EAS build
run: eas build --platform ${{ inputs.platform }} --profile ${{ inputs.profile }} --non-interactive --no-wait
- name: EAS submit
if: ${{ inputs.submit }}
run: eas submit --platform ${{ inputs.platform }} --profile ${{ inputs.profile }} --non-interactive --latest