-
Notifications
You must be signed in to change notification settings - Fork 47
51 lines (42 loc) · 1.2 KB
/
ci-cd.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
name: Android CI/CD
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17' # Change to the version you need for your project
- name: Cache Gradle files
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}
- name: Build and test
run: ./gradlew build --no-daemon
- name: Run unit tests
run: ./gradlew test --no-daemon
# Upload debug APK as an artifact
- name: Build debug APK
run: ./gradlew assembleDebug --no-daemon
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: movie-world-apk
path: app/build/outputs/apk/develop/debug/app-develop-debug.apk # Path to your APK