Skip to content

Commit

Permalink
Cache maven packages (#457)
Browse files Browse the repository at this point in the history
* Cache maven packages

* Cache maven packages
  • Loading branch information
ismailsimsek authored Dec 18, 2024
1 parent 2f44971 commit 60e4a25
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
- name: Cache Maven Packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Build with Maven
run: mvn -B --no-transfer-progress package --file pom.xml -Dsurefire.skipAfterFailureCount=1
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
run: |
echo "RELEASE_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Cache Maven Packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Build project
run: mvn -B --no-transfer-progress package -Passembly --file pom.xml -Drevision=${{ env.RELEASE_NAME }}

Expand Down

0 comments on commit 60e4a25

Please sign in to comment.