-
Notifications
You must be signed in to change notification settings - Fork 25
42 lines (40 loc) · 1.34 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Java CI
on: [push]
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
# test against LTS java versions:
java: [ 8, 11 ]
name: Test with Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B verify --file pom.xml
release:
needs: [build_and_test]
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
name: Release package
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 #v1.4.0
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
maven_args: -DskipTests
- name: Publish site
if: startsWith(github.ref, 'refs/tags/')
run: mvn clean site -Dgithub.site.password=${{ secrets.github_site_password }} -Dgithub.site.userName=${{ secrets.github_site_username }}