name: Java CI

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [8, 11, 15]

    name: Java ${{ matrix.java }}
    steps:
      - uses: actions/checkout@v2
      - name: Check Docs
        run: ./util/check_docs.py
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
      - name: CI Test
        run: mvn verify
      - name: Upload Artifact
        if: ${{ matrix.java == 8 }}
        uses: actions/upload-artifact@v2
        with:
          name: robot.jar 
          path: bin/robot.jar
          retention-days: 90

name: Java CI

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [11, 15, 17]

    name: Java ${{ matrix.java }}
    steps:
      - uses: actions/checkout@v2
      - name: Check Docs
        run: ./util/check_docs.py
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
      - name: CI Test
        run: mvn verify
      - name: Upload Artifact
        if: ${{ matrix.java == 8 }}
        uses: actions/upload-artifact@v2
        with:
          name: robot.jar 
          path: bin/robot.jar
          retention-days: 90

Drop Java 8 testing; add Java 17
Drop Java 8 testing; add Java 17