-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (62 loc) · 1.96 KB
/
android-release.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
69
70
71
72
73
74
75
name: Android-release CI/CD
on:
push:
branches:
- release/*
- main
pull_request:
branches:
- release/*
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create google-services
run: |
mkdir ./app/src/release
echo '${{ secrets.GOOGLE_SERVICES_JSON_RELEASE }}' > ./app/src/release/google-services.json
- name: Create KeyStore File and Properties
run: |
mkdir ./app/signing
echo '${{ secrets.KU_RING_KEY_STORE_JKS }}' | base64 -d > ./app/signing/ku_ring_keystore.jks
echo '${{ secrets.KEY_STORE_PROPERTIES }}' > ./app/signing/keystore.properties
- name: Create local.properteis
run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties
# Run unit test
- name: Run unit test
run: ./gradlew testreleaseUnitTest
# Build APK Release
- name: Build release Apk
run: ./gradlew assembleRelease
# Build AAB Release
- name: Build release Bundle
run: ./gradlew bundleRelease
# Upload AAB
- name: Upload a Build AAB Artifact
uses: actions/[email protected]
with:
# Artifact name
name: app-release.aab
# A file, directory or wildcard pattern that describes what to upload
path: ./app/build/outputs/bundle/release/app-release.aab
retention-days: 14
# Upload APK
- name: Upload a Build APK Artifact
uses: actions/[email protected]
with:
# Artifact name
name: app-release.apk
# A file, directory or wildcard pattern that describes what to upload
path: ./app/build/outputs/apk/release/app-release.apk
retention-days: 14