-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (65 loc) · 2.93 KB
/
build.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: Build
on: [ pull_request, push ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decode keystore
env:
ENCODED_STRING: ${{ secrets.SIGNING_KEYSTORE }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/release_keystore.jks
echo "${TMP_KEYSTORE_FILE_PATH}"
- name: Checkout the code
uses: actions/checkout@v2
- name: Decode Firebase API Key
env:
GOOGLE_SERVICE_FILE: ${{ secrets.GOOGLE_SERVICE_FILE }}
run: |
echo $GOOGLE_SERVICE_FILE | base64 -di > "app/google-services.json"
- name: Run Lint
env:
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
ANDROID_RELEASE_KEYSTORE: "/home/runner/work/_temp/keystore/release_keystore.jks"
run: sh ./gradlew lint
- name: Generate annotation from the Lint report
uses: yutailang0119/action-android-lint@v3
with:
report-path: build/reports/*.xml
continue-on-error: false
- name: Android Integration Tests
if: ${{ false }}
env:
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
ANDROID_RELEASE_KEYSTORE: "/home/runner/work/_temp/keystore/release_keystore.jks"
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: sh ./gradlew connectedCheck --stacktrace
- name: Build Giulia flavour
env:
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
ANDROID_RELEASE_KEYSTORE: "/home/runner/work/_temp/keystore/release_keystore.jks"
run: sh ./gradlew app:bundleGiulia
- name: Build Giulia AA flavour
env:
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
ANDROID_RELEASE_KEYSTORE: "/home/runner/work/_temp/keystore/release_keystore.jks"
run: sh ./gradlew app:bundleGiuliaAA
- name: Upload artifcats
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: app/build/outputs/