-
Notifications
You must be signed in to change notification settings - Fork 907
41 lines (39 loc) · 1.37 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
name: CI Android
on: [push, pull_request]
jobs:
build:
name: JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./android
strategy:
matrix:
# TODO Add 9, 10, 11, 12, and 13 after Kotlin 1.3.60
java_version: [11]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.1
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Configure Gradle
# Gradle configuration install deps
run: ./gradlew help
- name: Spot check
run: ./gradlew spotlessCheck --stacktrace
- name: Build Project
run: ./gradlew assemble --stacktrace
- name : Testing
run: ./gradlew test --stacktrace
- name: Final Checks
run: ./gradlew check --stacktrace
- name: Upload snapshot
run: ./gradlew publish -PmavenCentralUsername="${{ secrets.SonatypeUsername }}" -PmavenCentralPassword="${{ secrets.SonatypePassword }}"
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && matrix.java_version == '11'