generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (56 loc) · 1.79 KB
/
eas_ios.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
name: "CI: Build iOS with EAS"
on:
workflow_dispatch:
inputs:
device_type:
description: "Platform"
required: true
type: choice
default: device
options:
- device
- simulator
build_type:
description: "Build Type"
required: true
type: choice
default: preview
options:
- dev
- preview
- production
jobs:
build:
name: Install and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: yarn
- name: Setup Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install
- name: Set the variables
run: |
if [ "${{ inputs.device_type }}" == "device" ]; then
if [ "${{ inputs.build_type }}" == "dev" ]; then
echo "EAS_PROFILE=dev:ios" >> $GITHUB_ENV
elif [ "${{ inputs.build_type }}" == "preview" ]; then
echo "EAS_PROFILE=pre:ios" >> $GITHUB_ENV
else
echo "EAS_PROFILE=prod:ios" >> $GITHUB_ENV
elif [ "${{ inputs.device_type }}" == "simulator" ]; then
if [ "${{ inputs.build_type }}" == "dev" ]; then
echo "EAS_PROFILE=dev:ios-simulator" >> $GITHUB_ENV
elif [ "${{ inputs.build_type }}" == "preview" ]; then
echo "EAS_PROFILE=pre:ios-simulator" >> $GITHUB_ENV
else
echo "EAS_PROFILE=prod:ios-simulator" >> $GITHUB_ENV
- name: Build on EAS
run: eas build --platform ios --profile $EAS_PROFILE --non-interactive --no-wait