-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.93 KB
/
Copy pathbuild-android.yml
File metadata and controls
68 lines (58 loc) · 1.93 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build Android AAB
on:
workflow_dispatch:
jobs:
build-android:
name: Build Signed Android AAB
runs-on: ubuntu-latest
steps:
- name: Validate required secrets
run: |
missing=""
if [ -z "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" ]; then
missing="$missing ANDROID_KEYSTORE_BASE64"
fi
if [ -z "${{ secrets.ANDROID_KEY_ALIAS }}" ]; then
missing="$missing ANDROID_KEY_ALIAS"
fi
if [ -z "${{ secrets.ANDROID_KEY_PASSWORD }}" ]; then
missing="$missing ANDROID_KEY_PASSWORD"
fi
if [ -z "${{ secrets.ANDROID_STORE_PASSWORD }}" ]; then
missing="$missing ANDROID_STORE_PASSWORD"
fi
if [ -n "$missing" ]; then
echo "::error::Missing required secrets:$missing"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
cache: gradle
- name: Decode keystore
run: |
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
- name: Build release AAB
working-directory: android
env:
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
run: ./gradlew bundleRelease
- name: Upload AAB artifact
uses: actions/upload-artifact@v4
with:
name: app-release-aab
path: android/app/build/outputs/bundle/release/app-release.aab
retention-days: 30