-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (48 loc) · 1.61 KB
/
android.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
name: "Android CI: build and test"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch: # Allows you to run the workflow manually from the Actions tab
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Create unsigned apk and release bundle
uses: ./.github/actions/build
with:
releaseBuild: 'true'
buildApk: 'true'
buildBundle: 'false'
- name: Upload unsigned APK
uses: actions/[email protected]
with:
name: unsigned-release-apk
path: app/build/outputs/apk/release/app-release-unsigned.apk
if-no-files-found: error
- uses: noriban/sign-android-release@v5
name: Sign app APK
if: ${{ github.event_name != 'pull_request' }}
# ID used to access action output
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.CI_KEYSTORE_BASE64 }}
alias: ${{ secrets.CI_ALIAS }}
keyStorePassword: ${{ secrets.CI_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.CI_KEY_PASSWORD }}
- name: Upload signed APK
uses: actions/[email protected]
if: ${{ github.event_name != 'pull_request' }}
with:
name: signed-release-apk
path: ${{steps.sign_app.outputs.signedReleaseFile}}
if-no-files-found: error