-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.75 KB
/
Copy pathandroid.yml
File metadata and controls
64 lines (55 loc) · 1.75 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
name: Android CI
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- ".gitignore"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run verification checks (excluding lint due to pre-existing errors)
run: ./gradlew test checkModuleBoundaries checkSharedPreferencesIsolation checkResourceOwnershipBoundaries checkResourceSymbolBoundaries checkAppResourceReferenceBoundaries checkNoFeatureSettingsRUsageInApp
- name: Build Debug APK
run: ./gradlew assembleDebug
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 30
# Uncomment below to build Release APK (requires signing configuration)
# - name: Build Release APK
# run: ./gradlew assembleRelease
# env:
# KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }}
# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
# KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
# KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
#
# - name: Upload Release APK
# uses: actions/upload-artifact@v4
# with:
# name: app-release
# path: app/build/outputs/apk/release/app-release.apk
# retention-days: 90