generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 39
61 lines (54 loc) · 1.94 KB
/
pipeline.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: Build Android
jobs:
build-testing:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js v14
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install dependencies
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
- name: Build assets folder
run: |
cd android/app/src/main &&
if [ -d "assets" ]; then
rm -r assets
fi
- name: Build release
run: |
mkdir -p android/app/src/main/assets &&
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res &&
cd android &&
./gradlew assembleDebug
- name: list files
run: ls -lrt android/app/build/outputs/apk/debug
- name: upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: ${{secrets.GROUPS}}
file: android/app/build/outputs/apk/debug/app-debug.apk