-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (47 loc) · 1.57 KB
/
Copy pathandroid-debug.yml
File metadata and controls
60 lines (47 loc) · 1.57 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
name: Android debug
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: canary
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: temurin
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v3
with:
packages: platform-tools
- name: Install Android SDK packages
run: sdkmanager "platforms;android-36" "build-tools;36.0.0" "ndk;27.1.12297006"
- name: Decode Google services config
run: |
if [ -z "$GOOGLE_SERVICES_JSON_BASE64" ]; then
echo "GOOGLE_SERVICES_JSON_BASE64 secret is required to build Android."
exit 1
fi
printf '%s' "$GOOGLE_SERVICES_JSON_BASE64" | base64 --decode > android/app/google-services.json
env:
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
- name: Build Android debug APK
working-directory: android
run: ./gradlew :app:assembleDebug --no-daemon
- name: Upload Android debug APK
uses: actions/upload-artifact@v4
with:
name: android-debug-apk
path: android/app/build/outputs/apk/debug/app-debug.apk