-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (44 loc) · 1.55 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
name: Build
on:
push:
branches: [ master ]
pull_request_target:
types: [ labeled ]
branches: [ master ]
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Update keys.c
run: echo '${{ secrets.DEV_KEYS }}' > api/src/main/jni/keys.c
- name: Create google-services.json
uses: "finnp/create-file-action@master"
env:
FILE_NAME: "app/google-services.json"
FILE_DATA: ${{ secrets.DEV_GOOGLE_SERVICES }}
- name: Create keystore file
uses: "finnp/create-file-action@master"
env:
FILE_NAME: "app/${{ secrets.DEV_KEYSTORE_FILENAME }}"
FILE_BASE64: ${{ secrets.DEV_KEYSTORE }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check lint
run: ./gradlew lintDevRelease
- name: Build with Gradle
run: ./gradlew assembleDevRelease -PreleaseKeyAlias='${{ secrets.DEV_KEY_ALIAS }}' -PreleaseKeyPassword='${{ secrets.DEV_KEY_PASSWORD }}' -PreleaseStoreFile='${{ secrets.DEV_KEYSTORE_FILENAME }}' -PreleaseStorePassword='${{ secrets.DEV_KEYSTORE_PASSWORD }}'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: photos-dev-release.apk
path: app/build/outputs/apk/dev/releaseDebuggable/app-dev-releaseDebuggable.apk