# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java 17 CI with Maven

on:
  push:
    branches: [ develop ]
  pull_request:
    branches: [ develop ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 17
      uses: actions/setup-java@v2
      with:
        java-version: '17'
        distribution: 'adopt'
    - name: Cache 
      uses: actions/cache@v1
      with:
       path: ~/.m2/repository
       key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
       restore-keys: |
        ${{ runner.os }}-maven-    
    - name: Build with Maven
      run: mvn -B package --file pom.xml

Revert "Java 17 workflow was removed"
Revert "Java 17 workflow was removed"

This reverts commit ed88a8d51bed7797d0549cecfed8907f8f281305.
