Skip to content

Commit db2e81a

Browse files
authored
Add GitHub Actions workflow for building release APK
1 parent 17d403c commit db2e81a

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build Release APK
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
name: Build Release APK
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v6
14+
with:
15+
submodules: recursive
16+
fetch-depth: 0
17+
18+
- name: Set up Java
19+
uses: actions/setup-java@v5
20+
with:
21+
distribution: temurin
22+
java-version: '17'
23+
24+
- name: Set up Android SDK
25+
uses: android-actions/setup-android@v4
26+
27+
- name: Grant execute permission to Gradle
28+
run: chmod +x ./gradlew
29+
30+
- name: Decode Keystore
31+
env:
32+
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
33+
run: |
34+
echo "$KEYSTORE_BASE64" | base64 --decode > keystore.jks
35+
36+
- name: Set Environment Variables
37+
run: |
38+
echo "KEYSTORE_PATH=$PWD/keystore.jks" >> $GITHUB_ENV
39+
echo "KEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> $GITHUB_ENV
40+
echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> $GITHUB_ENV
41+
echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> $GITHUB_ENV
42+
43+
- name: Build Release APK
44+
run: ./gradlew assembleGithubRelease
45+
46+
- name: Upload Release APK
47+
uses: actions/upload-artifact@v7
48+
with:
49+
name: release-apk
50+
path: app/build/outputs/apk/github/release/*.apk

0 commit comments

Comments
 (0)