ChestsPlusPlus/.github/workflows/maven.yml
2024-07-03 17:20:15 +01:00

43 lines
1021 B
YAML

# 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: Build ChestsPlusPlus
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'
cache: 'maven'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
generate_release_notes: true
files: |
./Server/plugins/ChestsPlusPlus-*.jar