name: Build Maven artifacts

on:
  push:
    branches:
      - !main
      - !7.2.*
      - !7.3.*
  pull_request:
    branches:
      - main

jobs:
  build:
    name: Build and test

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 17
      uses: actions/setup-java@v2
      with:
        distribution: 'temurin'
        java-version: '17'
        cache: 'maven'

    - name: Build with Maven
      run: ./mvnw -B verify --file pom.xml
