-
Notifications
You must be signed in to change notification settings - Fork 11
60 lines (52 loc) · 1.5 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and Publish
on:
workflow_dispatch:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: adopt-hotspot
- 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
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: waterdog
path: waterdogpe/target/stargate-waterdogpe-*.jar
- name: Create pre-release
if: ${{ github.ref != 'refs/heads/master' }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Snapshot Build"
files: |
waterdogpe/target/stargate-waterdogpe-*.jar