-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (48 loc) · 1.67 KB
/
marge.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
name: ReleaseApkBuild
on:
push:
branches: [master, refactoring]
paths:
- app/src/**
- build.gradle.kts
- gradle.properties
- settings.gradle
jobs:
BuildReleaseApk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java 17
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Retrieve Version
run: |
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q app:printVersion)"
echo "::set-output name=VERSION_CODE::$(${{github.workspace}}/gradlew -q app:printVersionCode)"
id: android_version
- name: Build release APK
run: ./gradlew assembleRelease
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- uses: actions/upload-artifact@v3
with:
name: LightNovelReader-${{steps.android_version.outputs.VERSION_NAME}}-${{steps.android_version.outputs.VERSION_CODE}}-release
path: |
${{steps.sign_app.outputs.signedReleaseFile}}
app/build/outputs/mapping/release/mapping.txt