Gradle CI #218
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: Gradle CI | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ] | |
pull_request: | |
branches: [ master ] | |
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ] | |
create: | |
tags: | |
jobs: | |
gradle: | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Setup Gradle Dependencies Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | |
- name: Setup Gradle Wrapper Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: assemble | |
- name: Test | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: check | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: publishMavenCentralPublicationToMavenCentralRepository |