-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 1.9 KB
/
actions.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
name: build dist
on:
push:
pull_request:
permissions:
contents: write
jobs:
linux-build:
name: build on linux
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: apt update
run: |
sudo apt-get update
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: cache AVD
uses: actions/cache@v3
env:
cache-name: cache-avd
with:
path: /home/runner/.android/gradle/avd
key: ${{ runner.os }}-gradle-avd
- name: cache gradle caches
uses: actions/cache@v3
env:
cache-name: cache-gradle-caches
with:
path: /home/runner/.gradle/caches/
key: ${{ runner.os }}-gradle-caches
- name: Bump version
uses: chkfung/android-version-actions@v1.2.1
with:
gradlePath: app/build.gradle.kts
versionCode: ${{github.run_number}}
- name: build
run: ./gradlew build bundle
- name: Sign app APK
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: upload artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: apks and aabs
path: |
app/build/outputs/apk/*/debug/*.apk
${{steps.sign_app.outputs.signedReleaseFiles}}
- name: Create Release
uses: ncipollo/release-action@v1.12.0
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: app/build/outputs/apk/*/debug/*.apk,${{steps.sign_app.outputs.signedReleaseFiles}}