-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (62 loc) · 2.48 KB
/
expo.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
name: Expo CI
on:
push:
branches:
- master
- next
pull_request:
branches:
- '**'
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Checkout project repository - != next
if: "!endsWith(github.ref, '/next')"
uses: actions/checkout@v2
- name: Checkout project repository - == next
if: endsWith(github.ref, '/next')
uses: actions/checkout@v2
with:
fetch-depth: 255
- name: Setup kernel for react native, increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install, build and test
run: npm ci && npm test
- name: Login into Expo
run: npx expo-cli login -u ${{ secrets.EXPO_USERNAME }} -p ${{ secrets.EXPO_PASSWORD }}
- name: Evaluate version
id: version
run: |
/bin/bash --noprofile --norc ./.github/workflows/expo-build-number.sh
- name: Publish & build with Expo channel "default"
if: endsWith(github.ref, '/main')
env:
EXPO_BUILDNUMBER: ${{ steps.version.outputs.buildNumber }}
EXPO_VERSIONCODE: ${{ steps.version.outputs.versionCode }}
run: |
npx expo build:android -t app-bundle --non-interactive --release-channel default --config ./app.config.ts
npx expo build:ios -t archive --release-channel default --config ./app.config.ts
- name: Publish & build with Expo channel "next"
if: endsWith(github.ref, '/next')
env:
EXPO_BUILDNUMBER: ${{ steps.version.outputs.buildNumber }}
EXPO_VERSIONCODE: ${{ steps.version.outputs.versionCode }}
run: |
npx expo build:android -t app-bundle --non-interactive --release-channel next --config ./app.config.ts
npx expo build:ios -t archive --release-channel next --config ./app.config.ts
- name: Build
if: "!endsWith(github.ref, '/next') && !endsWith(github.ref, '/master')"
env:
EXPO_BUILDNUMBER: ${{ steps.version.outputs.buildNumber }}
EXPO_VERSIONCODE: ${{ steps.version.outputs.versionCode }}
run: |
npx expo build:android -t app-bundle --non-interactive --release-channel pr --config ./app.config.ts
# Note: We do not build ios bundles for PR's as these need to be signed and we don't want PR's to be signed.