-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (41 loc) · 1.6 KB
/
ci.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
name: CI
on: [ push, pull_request ]
jobs:
build:
name: CI-build
runs-on: ubuntu-latest
steps:
- id: checkout
name: 'Check out sources'
uses: actions/checkout@v4
- id: setup-java
name: 'Set up Java'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- id: setup-gradle
name: 'Set up Gradle'
uses: gradle/actions/setup-gradle@v4
- id: decode_keystore
name: 'Decode keystore'
uses: timheuer/base64-to-file@v1
env:
keystore_string: ${{ secrets.KEYSTORE }}
if: ${{ env.keystore_string != '' }}
with:
fileName: keystore.jks
encodedString: ${{ env.keystore_string }}
- id: build
name: 'Build'
env:
keystore: ${{ secrets.KEYSTORE }}
password: ${{ secrets.PASSWORD }}
alias: ${{ secrets.ALIAS }}
run: ./gradlew build ${{ (steps.decode_keystore.outputs.filePath != '' && env.keystore != '' && env.password != '' && env.alias != '') && format('-Pandroid.injected.signing.store.file={0} -Pandroid.injected.signing.store.password={1} -Pandroid.injected.signing.key.alias={2} -Pandroid.injected.signing.key.password={1} -Pandroid.injected.signing.v1-enabled=true -Pandroid.injected.signing.v2-enabled=true', steps.decode_keystore.outputs.filePath, env.password, env.alias) || '' }}
- id: upload-artifact
name: 'Upload artifacts'
uses: actions/upload-artifact@v4
with:
name: artifacts.zip
path: app/build/outputs/apk/release/*.apk