-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (96 loc) · 4.18 KB
/
expo-update.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: TEST - expo-update mode
on:
workflow_call:
inputs:
env:
description: 'Environment (dev, test, prod)'
required: true
type: string
config:
description: 'Config (default-devices, all-devices, many-stories)'
required: false
default: 'default-devices'
type: string
use_github_action:
description: 'Use Sherlo Github Action'
required: false
default: false
type: boolean
project:
description: 'Project (expo-update, device-testing, many-stories)'
required: true
type: string
with_builds:
description: 'With builds'
required: false
default: false
type: boolean
jobs:
run_sherlo_expo_update:
name: Run Sherlo in expo-update mode
environment: ${{ inputs.env }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
lfs: true
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.18.0'
- name: Install dependencies
run: yarn
- name: Build dependencies
run: yarn switch-env:${{ inputs.env }}
env:
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Trigger EAS update and capture manifest URLs
working-directory: testing/expo-storybook-8
run: |
eas update --channel 'development' --message 'Expo Update' --json --non-interactive
- name: Run sherlo expo-update (with native builds) with CLI
if: inputs.with_builds == true && inputs.use_github_action == false
working-directory: testing/expo-storybook-8
run: |
yarn sherlo expo-update \
--config ../../configs/${{ inputs.config }}.json \
--android builds/development/android.apk \
--ios builds/development/ios.tar.gz \
--branch development \
--token ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }}
- name: Run sherlo expo-update (with native builds) with Github Action
if: inputs.with_builds == true && inputs.use_github_action == true
uses: ./.
with:
command: expo-update
projectRoot: testing/expo-storybook-8
config: ../../configs/${{ inputs.config }}.json
android: builds/development/android.apk
ios: builds/development/ios.tar.gz
branch: development
env:
SHERLO_TOKEN: ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }}
- name: Run sherlo expo-update (without native builds) with CLI
if: inputs.with_builds == false && inputs.use_github_action == false
working-directory: testing/expo-storybook-8
run: |
yarn sherlo expo-update \
--config ../../configs/${{ inputs.config }}.json \
--branch development \
--token ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }}
- name: Run sherlo expo-update (without native builds) with Github Action
if: inputs.with_builds == false && inputs.use_github_action == true
uses: ./.
with:
command: expo-update
projectRoot: testing/expo-storybook-8
config: ../../configs/${{ inputs.config }}.json
branch: development
env:
SHERLO_TOKEN: ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }}