Skip to content
This repository was archived by the owner on Oct 24, 2020. It is now read-only.

Commit b089b21

Browse files
committed
Cache Maven packages
1 parent d6849f8 commit b089b21

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/maven.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@ jobs:
1919
java-version: 11
2020
- name: Grant execute permission for mvnw
2121
run: chmod +x mvnw
22+
- name: Cache Maven packages
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.m2
26+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
27+
restore-keys: ${{ runner.os }}-m2
2228
- name: Build with Maven
2329
run: ./mvnw -B package --file pom.xml
2430
- name: Release Maven package
31+
if: "github.event_name != 'pull_request'"
2532
uses: samuelmeuli/action-maven-publish@v1
2633
with:
2734
gpg_private_key: ${{ secrets.SIGNING_KEY }}
2835
gpg_passphrase: ${{ secrets.SIGNING_PASSWORD }}
2936
nexus_username: ${{ secrets.OSSRH_USERNAME }}
3037
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
31-
if: "github.event_name != 'pull_request'"

0 commit comments

Comments
 (0)