-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.69 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
name: "release"
on:
push:
branches: [develop]
tags:
- 'v*'
permissions:
contents: write
jobs:
android-build-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: "Set up Java"
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: "17"
- name: "Cache Gradle and wrapper"
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
- name: "Decode Keystore"
env:
ENCODED_STRING: ${{ secrets.KEYSTORE_ENCRYPTED }}
run: |
echo $ENCODED_STRING > keystore-b64.txt
base64 -d keystore-b64.txt > app/keystore.jks
- name: "Build Release"
env:
SIGNING_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
run: ./gradlew :app:assembleRelease :app:bundleRelease
- name: "Upload Release Builds"
uses: actions/upload-artifact@v4
with:
name: release-artifacts
if-no-files-found: error
path: |
app/build/outputs/apk/release/*.apk
app/build/outputs/bundle/release/*.aab
- name: "Create Github Release"
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
prerelease: true
files: |
app/build/outputs/apk/release/*.apk
app/build/outputs/bundle/release/*.aab