-
-
Notifications
You must be signed in to change notification settings - Fork 88
62 lines (55 loc) · 2.29 KB
/
build.yml
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
name: build
on:
workflow_dispatch:
inputs:
platform:
description: Platform to build for (all/android/ios)
type: choice
required: true
default: all
options:
- all
- android
- ios
profile:
description: EAS build profile (development/production)
type: choice
required: true
default: development
options:
- development
- production
submit:
description: Auto submit to the store? (production only)
type: boolean
required: false
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repository
uses: actions/checkout@v4
- name: 🏗 Setup monorepo
uses: ./.github/actions/setup-monorepo
with:
expo-token: ${{ secrets.EXPO_TOKEN }}
- name: 👷 Build packages for example
run: pnpm run -w build:example
# Remove this step and configure the app to contain your own project and bundle identifiers.
# This is intentionally omitted in the template repository to guide users through the setup when cloning.
- name: 👷 Configure project
if: ${{ github.repository == 'byCedric/expo-monorepo-example' }}
working-directory: apps/example
run: |
eas init --id d202a56f-0162-450d-af3b-a2d2e0678594 --force --non-interactive
echo $(jq '.expo.runtimeVersion.policy = "sdkVersion"' app.json) > app.json
echo $(jq '.expo.android.package = "dev.cedric.monorepo"' app.json) > app.json
echo $(jq '.expo.ios.bundleIdentifier = "dev.cedric.monorepo"' app.json) > app.json
- name: 🚀 Build example
if: ${{ github.event.inputs.submit == 'false' || github.event.inputs.profile != 'production' }}
working-directory: apps/example
run: eas build --non-interactive --wait --platform=${{ github.event.inputs.platform }} --profile=${{ github.event.inputs.profile }}
- name: 🚀 Build & submit example
if: ${{ github.event.inputs.submit == 'true' && github.event.inputs.profile != 'production' }}
working-directory: apps/example
run: eas build --non-interactive --wait --auto-submit --platform=${{ github.event.inputs.platform }} --profile=${{ github.event.inputs.profile }}