forked from pakfield/dynmap-mobs
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.46 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
43
44
45
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
pull_request:
branches: [ master ]
types: [ opened, reopened, synchronize, ready_for_review ]
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
# Don't run on drafts
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -Dchangelist=-dev package
- uses: actions/upload-artifact@v3
with:
name: dynmap-mobs-SNAPSHOT
path: /home/runner/work/dynmap-mobs/dynmap-mobs/target/dynmap-mobs-*.jar
# Use fork supporting release notes
- uses: "Plastikmensch/action-automatic-releases@fixed"
# Don't create dev release on PR
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev"
title: "Development Build (Use at your own risk)"
prerelease: true
auto_generate_release_notes: true
files: |
target/*.jar