Merge pull request #176 from tailrocks/renovate/java-17.x #173
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: Build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Spotless Check | |
run: ./gradlew spotlessCheck | |
- name: Test | |
run: ./gradlew test --rerun-tasks | |
- name: Build | |
run: ./gradlew generatePomFileForMavenJavaPublication build | |
publish: | |
runs-on: ubuntu-latest | |
environment: Sonatype | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up OpenJDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Publish to Sonatype | |
run: ./publish-sonatype.sh |