-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.56 KB
/
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
76
77
78
79
80
81
82
83
84
name: Release
on:
push:
branches: [ "master" ]
tags:
- v*
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
env:
HIOR_PATH_R: ${{ secrets.HIOR_PATH_R }}
HIOR_KEY_PASS_R: ${{ secrets.HIOR_KEY_PASS_R }}
HIOR_STORE_PASS_R: ${{ secrets.HIOR_STORE_PASS_R }}
HIOR_ALIAS_R: ${{ secrets.HIOR_ALIAS_R }}
ENCODED_STRING_R: ${{ secrets.HIOR_KEYSTORE_R }}
HIOR_PATH_D: ${{ secrets.HIOR_PATH_D }}
HIOR_KEY_PASS_D: ${{ secrets.HIOR_KEY_PASS_D }}
HIOR_STORE_PASS_D: ${{ secrets.HIOR_STORE_PASS_D }}
HIOR_ALIAS_D: ${{ secrets.HIOR_ALIAS_D }}
ENCODED_STRING_D: ${{ secrets.HIOR_KEYSTORE_D }}
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Setup Gradle Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Decode google-services.json
run: echo "$GOOGLE_SERVICES_JSON" | base64 --decode > app/google-services.json
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Restore release keystore.jks
run: echo $ENCODED_STRING_R | base64 -d > ./release.keystore.jks
- name: Restore debug keystore.jks
run: echo $ENCODED_STRING_D | base64 -d > ./debug.keystore.jks
- name: Build Release apk
run: ./gradlew assembleRelease
- name: Build Release bundle
run: ./gradlew bundleRelease
- name: Upload Release Build To Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: |
app/build/outputs/apl/release/
app/build/outputs/bundle/release/
- name: Create Github release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
app/build/outputs/apk/release/app-release.apk
app/build/outputs/bundle/release/app-release.aab