-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 2.09 KB
/
eas.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
name: 'Expo: Publish Main'
on: "push"
jobs:
publish:
name: Install and publish
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: 'Check secrets'
id: check-secrets
run: echo "has-secrets=$([ -n "${{ env.EXPO_ACCESS_TOKEN }}" ] && echo true || echo false)" >> $GITHUB_OUTPUT
env:
EXPO_ACCESS_TOKEN: ${{ secrets.EXPO_ACCESS_TOKEN }}
- name: 'Warn required secrets'
if: ${{ steps.check-secrets.outputs.has-secrets == 'false' }}
run: echo 'EXPO_ACCESS_TOKEN missing in Github secrets. Skipping Expo deployment with EAS update.'
- name: Setup Node
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }}
uses: actions/setup-node@v2
with:
node-version: 18.x
cache: yarn
- name: Setup Expo
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }}
uses: expo/expo-github-action@v7
with:
expo-version: latest
eas-version: latest
expo-cache: true
packager: yarn
token: ${{ secrets.EXPO_ACCESS_TOKEN }}
- name: Find yarn cache
id: yarn-cache-path
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }}
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore cache
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }}
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install Node.js dependencies
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }}
run: yarn install --immutable
- name: Deploy with EAS update
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }}
run: cd apps/expo && eas update --auto
env:
ENV: staging
BACKEND_URL: ${{ secrets.BACKEND_URL }}
NEXT_PUBLIC_APP_LINKS: ${{ secrets.NEXT_PUBLIC_APP_LINKS }}