-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.6 KB
/
ci.yml
File metadata and controls
64 lines (52 loc) · 1.6 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:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
# https://github.com/styfle/cancel-workflow-action#usage
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Create local.properties
env:
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
run: |
echo "MAPS_API_KEY=$MAPS_API_KEY" >> local.properties
# gradle cache
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run lint for lint the variants.
run: ./gradlew lint
#- name: Run unit tests for testDebugUnitTest the variants.
# run: ./gradlew testDebugUnitTest
- name: Build tasks (Assemble main outputs for assembleDebug the variants.)
run: |
./gradlew assembleDebug
# https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml
- name: Upload build outputs (APKs)
uses: actions/upload-artifact@v4
with:
name: build-outputs
path: app/build/outputs
- name: Upload build reports
if: always()
uses: actions/upload-artifact@v4
with:
name: build-reports
path: app/build/reports