-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (61 loc) · 2.22 KB
/
android-ci.yml
File metadata and controls
75 lines (61 loc) · 2.22 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
69
70
71
72
73
74
75
name: Android CI Build
# Manual build or tag-triggered release build.
# PR quality checks (lint, tests, type-check) live in ci.yml.
on:
workflow_dispatch:
push:
tags:
- 'v*'
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
jobs:
android-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('android/gradle/wrapper/gradle-wrapper.properties', 'android/**/*.gradle*') }}
restore-keys: gradle-
- name: Install Android SDK
uses: android-actions/setup-android@v3
- name: Seed .env for build
run: cp .env.example .env
# Template uses the debug keystore. Replace with a real signing step
# (e.g. decode a base64-encoded keystore from secrets) before store upload.
- name: Build Android Release APK
run: cd android && ./gradlew assembleRelease
# Uncomment for Play Store upload (requires signing + Google service account secret):
# - name: Build Android Release Bundle (AAB)
# run: cd android && ./gradlew bundleRelease
# Upload Sentry source maps if DSN is configured.
# Uncomment and set SENTRY_AUTH_TOKEN + SENTRY_ORG + SENTRY_PROJECT secrets.
# - name: Upload Sentry source maps
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
# SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# run: npx @sentry/cli releases files "${{ github.ref_name }}" upload-sourcemaps android/app/build
- name: Upload APK Artifact
uses: actions/upload-artifact@v4
with:
name: android-release-apk
path: android/app/build/outputs/apk/release/*.apk