Skip to content

Commit 82b174e

Browse files
committed
chore(ci): use built-in setup-java Maven cache
1 parent 2f85bd9 commit 82b174e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

.github/workflows/maven-ci.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ jobs:
2626
java-version: ${{ matrix.java }}
2727
distribution: "temurin"
2828
cache: 'maven'
29-
- name: "Get Maven dependencies from cache"
30-
uses: actions/cache@v4
31-
with:
32-
path: ~/.m2/repository
33-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
34-
restore-keys: ${{ runner.os }}-maven-
3529
- name: "Build with Maven"
3630
run: mvn --batch-mode verify
3731

@@ -48,15 +42,10 @@ jobs:
4842
with:
4943
java-version: 21
5044
distribution: "temurin"
45+
cache: 'maven'
5146
server-id: central
5247
server-username: MAVEN_USERNAME
5348
server-password: MAVEN_PASSWORD
54-
- name: "Get Maven dependencies from cache"
55-
uses: actions/cache@v4
56-
with:
57-
path: ~/.m2/repository
58-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
59-
restore-keys: ${{ runner.os }}-maven-
6049
- name: "Build and deploy to the Maven Central Repository"
6150
run: mvn --batch-mode -DskipTests deploy
6251
env:

0 commit comments

Comments
 (0)