Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 1f7512b

Browse files
authored
Add maven-publish.yml workflow
1 parent ee4d6b4 commit 1f7512b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/maven-publish.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+
4+
name: Build with Maven
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request: {}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 11
17+
uses: actions/setup-java@v2
18+
with:
19+
java-version: '11'
20+
distribution: 'adopt'
21+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
22+
settings-path: ${{ github.workspace }} # location for the settings.xml file
23+
- name: Restore Maven cache
24+
uses: skjolber/maven-cache-github-action@v1
25+
with:
26+
step: restore
27+
- name: Build with Maven
28+
run: mvn -B package --file pom.xml
29+
- name: Save Maven cache
30+
uses: skjolber/maven-cache-github-action@v1
31+
with:
32+
step: save

0 commit comments

Comments
 (0)