diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a5c3bc3d..7b97e2cf 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,11 +15,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 16 - uses: actions/setup-java@v2 - with: - java-version: '16' - distribution: 'adopt' - - name: Build with Maven - run: mvn -B package --file pom.xml + - uses: actions/checkout@v2 + - name: Set up JDK 16 + uses: actions/setup-java@v2 + with: + java-version: '16' + distribution: 'adopt' + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build with Maven + run: mvn -B package --file pom.xml