-
Notifications
You must be signed in to change notification settings - Fork 43
34 lines (32 loc) · 1.14 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
name: JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [11]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java_version }}
cache: 'gradle'
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Configure Gradle
# Gradle configuration install deps
run: ./gradlew help
- name: Build Project
run: ./gradlew spotlessCheck build --stacktrace
- name : Testing
run: ./gradlew test --stacktrace
- name: Final Checks
run: ./gradlew check --stacktrace
- name: Upload Snapshot
run: ./gradlew publish --no-daemon --no-parallel -PmavenCentralUsername="${{ secrets.SonatypeUsername }}" -PmavenCentralPassword="${{ secrets.SonatypePassword }}"
if: success() && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && matrix.java_version == '11'