From 7d45490a010d47a83e3067869e90db8205652fc2 Mon Sep 17 00:00:00 2001 From: Andrus Adamchik Date: Sun, 21 Apr 2024 08:48:27 -0400 Subject: [PATCH] GH Actions: use cache feature of "setup-java" --- .github/workflows/maven.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b177f16..951dd27 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,13 +21,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: 'temurin' - - - name: Retrieve mvn repo cache... - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-build-v1 - restore-keys: ${{ runner.os }}-maven + cache: 'maven' - name: Build and test... run: mvn clean verify -U @@ -51,15 +45,7 @@ jobs: with: java-version: 11 distribution: 'temurin' - - - name: Retrieve mvn repo cache... - uses: actions/cache@v4 - # skip this for the release versions - if: contains(env.POM_VERSION, '-SNAPSHOT') - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-build-v1 - restore-keys: ${{ runner.os }}-maven + cache: 'maven' - name: Deploy... run: mvn clean source:jar-no-fork javadoc:jar deploy -DskipTests --settings .github/workflows/maven_settings.xml