clean up build script #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |