add github actions

This commit is contained in:
MidasSword 2020-10-10 12:48:18 -07:00
parent 938d3583d7
commit b7c57859da

38
.github/workflows/compile.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Test EcoEnchants
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
name: Build Maven project
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# - name: Build Spigot
# # Takes 3 minutes
# # We only build 1.15 because it is the only Spigot version that is not
# # available on their Maven repo
# run: |
# cd ..
# wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
# java -jar BuildTools.jar --rev 1.15
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build EcoEnchants
run: |
mvn initialize --batch-mode
mvn package install --batch-mode