Merge branch 'mcMMO-Dev:master' into update #322
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow automatically tests new commits and pull requests as they come in. | |
# Note that this does not upload any artifacts, you will need to compile mcMMO manually | |
# if you wish to create the actual jar. | |
name: Maven Build and Upload | |
on: | |
# We run our tests whenever the pom or a source file was touched. | |
# There is no need to run Maven when only the changelog was touched. | |
# We may also want to re-run this workflow when the workflow file itself | |
# was updated too. | |
push: | |
paths: | |
- 'src/**' | |
- 'pom.xml' | |
- '.github/workflows/maven.yml' | |
# Whenever someone submits a new pull request which modified the pom or a source file, | |
# we want to ensure it compiles successfully and that all tests will pass. | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'pom.xml' | |
jobs: | |
compile: | |
name: Maven compiler | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Check out the current working tree | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
# 2. Setup Java 17 JDK (Adopt) | |
- name: Java 17 setup | |
uses: actions/setup-java@v4.2.0 | |
with: | |
distribution: 'adopt' | |
java-package: jdk | |
java-version: '17' | |
check-latest: true | |
cache: 'maven' | |
# 4. Build via Maven | |
- name: Build via Maven | |
run: mvn verify -B --file pom.xml -DdisableXmlReport=true | |
# 5. Upload via Github Actions | |
- name: Upload | |
uses: actions/upload-artifact@v4.3.1 | |
with: | |
name: mcMMO | |
path: target/mcMMO-*.jar |