-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.51 KB
/
android.yml
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 CI/CD Pipeline 🚀
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
workflow_dispatch: # Allows manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛎️ Check out code
uses: actions/checkout@v3
- name: ☕ Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: 🗂️ Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradlew*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 🔑 Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: 🏗️ Build with Gradle
run: ./gradlew assembleRelease --scan --no-daemon
# - name: 🧪 Run Unit Tests
# run: ./gradlew test
#
# - name: 📤 Upload Test Reports
# uses: actions/upload-artifact@v4
# with:
# name: test-report
# path: build/reports/tests/test
- name: 🎨 Check Code Style with KtLint
run: ./gradlew ktlintCheck
- name: 📤 Upload KtLint Reports
uses: actions/upload-artifact@v4
with:
name: ktlint-report
path: build/reports/ktlint/
- name: 📲 Upload APK
uses: actions/upload-artifact@v4
with:
name: release-apk
path: app/build/outputs/apk/release/*.apk