State project status in README #396
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 | |
- pull_request | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [8, 11] | |
sonar: | |
- "" | |
- "8.9.0.43852" | |
include: | |
- java: 8 | |
sonar: "" | |
archive: "yes" | |
- java: 11 | |
sonar: "9.0.0.45539" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'adopt' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven | |
- name: Build | |
run: .github/ci-build.sh | |
env: | |
SONAR_VERSION: ${{ matrix.sonar }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Upload Plugin JAR | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Plugin | |
path: sonar-groovy-plugin/target/*.jar | |
if: matrix.archive == 'yes' |