-
Notifications
You must be signed in to change notification settings - Fork 18
68 lines (59 loc) · 2.31 KB
/
submit.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
name: Submit
on:
workflow_dispatch:
branches:
- main
inputs:
platform:
description: 'Platform to submit (ios or android)'
required: true
jobs:
update:
name: Submit
runs-on: ubuntu-latest
steps:
- name: Verify input
run: |
if [[ "${{ github.event.inputs.platform }}" != "ios" && "${{ github.event.inputs.platform }}" != "android" ]]; then
echo "Input platform must be 'ios' or 'android'"
exit 1
fi
- 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
with:
fetch-depth: 0
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Create env file
run: |
echo "${{ secrets.ENV_FILE_COMMON }}" > .env.common
echo "${{ secrets.ENV_FILE_DEVELOPMENT }}" > .env.development
echo "${{ secrets.ENV_FILE_PRODUCTION }}" > .env.production
echo "${{ secrets.ENV_FILE_TEST }}" > .env.test
echo "${{ secrets.ANDROID_GOOGLE_SERVICES_DEVELOPMENT }}" > google-services.development.json
echo "${{ secrets.ANDROID_GOOGLE_SERVICES_TEST }}" > google-services.test.json
echo "${{ secrets.ANDROID_GOOGLE_SERVICES_PRODUCTION }}" > google-services.production.json
echo "${{ secrets.IOS_GOOGLE_SERVICES_DEVELOPMENT }}" > GoogleService-Info.development.plist
echo "${{ secrets.IOS_GOOGLE_SERVICES_TEST }}" > GoogleService-Info.test.plist
echo "${{ secrets.IOS_GOOGLE_SERVICES_PRODUCTION }}" > GoogleService-Info.production.plist
- name: Install dependencies
run: yarn install
- name: Submit
env:
NODE_OPTIONS: --max_old_space_size=4096
run: |
eas build --non-interactive -p ${{ github.event.inputs.platform }} --auto-submit