-
Notifications
You must be signed in to change notification settings - Fork 38
46 lines (38 loc) · 1.21 KB
/
Copy pathbuild_release.yml
File metadata and controls
46 lines (38 loc) · 1.21 KB
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
name: Build Release APK
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout latest tag
uses: actions/checkout@v6
with:
fetch-depth: 0 # fetch all history and tags
- name: Checkout latest Git tag
run: |
latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
echo "Latest tag is $latest_tag"
git checkout $latest_tag
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > keystore.jks
- name: Grant execute permission to gradlew
run: chmod +x gradlew
- name: Build Release APK
env:
KEYSTORE_FILE: keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew assembleRelease
- name: Upload APK
uses: actions/upload-artifact@v7
with:
name: release-apk
path: app/build/outputs/apk/release/*.apk