-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (40 loc) · 1.1 KB
/
maven-publish.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
name: Java CI with Maven
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install Spigot Build tools (1.17.1)
uses: SpraxDev/Action-SpigotMC@v4
with:
versions: 1.17.1
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::$(date +'%Y.%m.%d')-$(git rev-parse --short HEAD)"
- name: Add Jar to GitHub releases
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.tag.outputs.release_tag }}"
prerelease: false
title: "Release ${{ steps.tag.outputs.release_tag }}"
files: |
target/*.jar