Skip to content

Commit 5deaac0

Browse files
committed
Setup github actions maven build
1 parent 940f6b7 commit 5deaac0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/maven.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Build
5+
6+
on:
7+
push:
8+
branches: [ $default-branch ]
9+
pull_request:
10+
branches: [ $default-branch ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v2
19+
with:
20+
java-version: '8'
21+
distribution: 'adopt'
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
28+
- name: Build with Maven
29+
run: mvn -B package --file pom.xml

0 commit comments

Comments
 (0)