-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (49 loc) · 1.67 KB
/
matrix.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
name: react-native-android-build-apk
on:
push:
pull_request:
release:
types: [published]
jobs:
build-android:
name: ${{ matrix.build_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_name: ['bundle', 'apk']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Setup Cache
uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: reactnative-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
reactnative-yarn-
- name: Install npm dependencies
run: |
yarn --network-concurrency 1 --network-timeout 120000
- name: Build Android Debug APK
if: matrix.build_name == 'apk'
run: |
perl -pi -e 's/YOUR_SENTRY_TOKEN/$ENV{TOKEN}/' android/sentry.properties
export SENTRY_PROPERTIES=android/sentry.properties
cd android && ./gradlew assembleDebug
env:
TOKEN: ${{ secrets.SENTRY_TOKEN }}
- name: Build Android Debug AAB
if: matrix.build_name == 'bundle'
run: |
perl -pi -e 's/YOUR_SENTRY_TOKEN/$ENV{TOKEN}/' android/sentry.properties
export SENTRY_PROPERTIES=android/sentry.properties
cd android && ./gradlew bundleDebug
env:
TOKEN: ${{ secrets.SENTRY_TOKEN }}