name: "Build"

on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        java: [ 11, 16 ]

    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Install JDK ${{ matrix.java }}
        uses: actions/setup-java@v2
        with:
          java-version: ${{ matrix.java }}
          distribution: 'adopt'

      - name: Build & Test
        run: mvn clean verify

      - name: Javadoc etc
        run: mvn clean verify -Prelease -Dgpg.skip -DskipTests

      - name: RAT check
        run: mvn clean -Prelease apache-rat:check

name: "Build"

on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        java: [ 11, 16 ]

    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Install JDK ${{ matrix.java }}
        uses: actions/setup-java@v2
        with:
          java-version: ${{ matrix.java }}
          distribution: 'temurin'

      - name: Build & Test
        run: mvn clean verify

      - name: Javadoc etc
        run: mvn clean verify -Prelease -Dgpg.skip -DskipTests

      - name: RAT check
        run: mvn clean -Prelease apache-rat:check

Switch to temurin as adopt is now EOL
Switch to temurin as adopt is now EOL
