Downgrade spigot version to keep compatibility with java 8 #213
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 will build a Java project with Maven | |
# 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: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
id: java8 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
id: java17 | |
- name: Create toolchains.xml | |
run: | | |
mkdir -p ~/.m2 | |
echo '<?xml version="1.0" encoding="UTF-8"?> | |
<toolchains> | |
<toolchain> | |
<type>jdk</type> | |
<provides> | |
<version>1.8</version> | |
<vendor>temurin</vendor> | |
</provides> | |
<configuration> | |
<jdkHome: ${{ steps.java8.outputs.java-home }} | |
</configuration> | |
</toolchain> | |
</toolchains>' > ~/.m2/toolchains.xml | |
- name: Build with Maven | |
run: mvn clean install --batch-mode | |
env: | |
JAVA_HOME_8: ${{ steps.java8.outputs.java-home }} | |
JAVA_HOME_17: ${{ steps.java17.outputs.java-home }} | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
env: | |
JAVA_HOME_8: ${{ steps.java8.outputs.java-home }} | |
JAVA_HOME_17: ${{ steps.java17.outputs.java-home }} |