-
Notifications
You must be signed in to change notification settings - Fork 388
53 lines (48 loc) · 1.48 KB
/
Copy pathauto_build.yml
File metadata and controls
53 lines (48 loc) · 1.48 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
name: AutoBuild
#
# Constructed with help from:
# - https://blog.logrocket.com/android-ci-cd-using-github-actions/
# - https://www.droidcon.com/2022/01/05/getting-started-ci-cd-for-android-project-part-3-github-actions/
# - https://stackoverflow.com/questions/61335109/
# - https://github.com/actions/setup-java
# - https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
#
on:
release:
types: [created]
pull_request:
types: [opened, edited, reopened, synchronize]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: |
echo "Building Debug APK."
chmod +x gradlew
./gradlew build --no-daemon
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/upload-artifact@v4
with:
name: Package
path: app/build/outputs/apk/release/app-release-unsigned.apk