-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 965 Bytes
/
maven-build.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
name: Build and Publish
on:
workflow_dispatch:
push:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: adopt-hotspot
settings-path: ${{ github.workspace }}
- name: Setup maven repo
uses: s4u/[email protected]
with:
servers: |
[{
"id": "waterdog-snapshots",
"username": "${{ secrets.DEPLOY_USERNAME }}",
"password": "${{ secrets.DEPLOY_PASSWORD }}"
}]
- name: Build
if: ${{ github.ref != 'refs/heads/master' }}
run: mvn -B clean package
shell: bash
- name: Build and Deploy
if: ${{ github.ref == 'refs/heads/master' }}
run: mvn -B clean package deploy
shell: bash