-
Notifications
You must be signed in to change notification settings - Fork 839
83 lines (72 loc) · 2.34 KB
/
app-mobile-ota-update-production.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: app-mobile OTA production
on:
workflow_dispatch:
inputs:
platform:
description: Platform (android/ios)
type: choice
required: true
default: ios
options:
- ios
- android
jobs:
update:
name: EAS Update Production
runs-on: ubuntu-latest
# runs-on: macos-latest
env:
EXPO_USE_DEV_SERVER: true
TMPDIR: /tmp # Used for metro caching
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_ENV: production
APP_ENV: production
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name: 📦 Checkout repository
uses: actions/checkout@v3
- name: 🌐 Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Cache Metro
uses: actions/cache@v3
id: cache-metro
with:
path: |
${{ env.TMPDIR }}/metro-cache
${{ env.TMPDIR }}/haste-map*
key: npm-${{ env.NODE_VERSION }}-${{ runner.os }}
- name: 🚀 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: 🧶 Install dependencies
run: yarn install --immutable
- name: 🏗️ Build dependencies
env:
NODE_ENV: production
BACKPACK_CONFIG_VERSION: "${{ env.RELEASE_PREFIX }}-latest-beta-${{ github.run_number }}"
BACKPACK_CONFIG_LOG_LEVEL: "none"
# CI!=true so that build warnings aren't treated like errors (for now)
CI: ""
run: yarn build:mobile
- name: 🚀 Publish Apple Update
env:
APP_ENV: production
working-directory: ./packages/app-mobile
if: "contains(github.event.inputs.platform, 'ios')"
run: "yarn ios:ota-production"
- name: 🚀 Publish Android Update
env:
APP_ENV: production
working-directory: ./packages/app-mobile
if: "contains(github.event.inputs.platform, 'android')"
run: "yarn android:ota-production"