From 59b51b17304c03832002c1650eb469031611a11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A5=93?= Date: Tue, 25 Jun 2024 23:31:08 +0800 Subject: [PATCH] Updates for Minecraft 1.21 (#4) To satisfy the Java version requirement changes in Minecraft 1.21, the steps about `setup-java` is changed. - the distribution is changed to "temurin" from "adopt", as the old one is depreacted and moved to the new one. - the version is changed to "21" from "17", as MC required. And there are some other document and workflow script changes. - Updated README. - Adds the trigger on push, so that it will be invoked on PR commit. --- .github/workflows/buildspigot-buildtools.yml | 12 ++++++++---- README.md | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildspigot-buildtools.yml b/.github/workflows/buildspigot-buildtools.yml index feef410..9a87684 100644 --- a/.github/workflows/buildspigot-buildtools.yml +++ b/.github/workflows/buildspigot-buildtools.yml @@ -5,6 +5,7 @@ on: - cron: "0 0 6,12,18,24,30 * *" workflow_dispatch: + push: jobs: build: @@ -16,10 +17,13 @@ jobs: run: "curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o ./BuildTools.jar" - name: "Setting up Java Development Kit" - uses: "actions/setup-java@v2.1.0" + uses: "actions/setup-java@v4" with: - distribution: "adopt" - java-version: "17" + # You can get the distribution lists at + # https://github.com/actions/setup-java#supported-distributions + distribution: "temurin" + # Use a proper Java version to execute the build application + java-version: "21" # Build Spigot by BuildTools - name: "Building Spigot" @@ -36,7 +40,7 @@ jobs: - name: "Getting Current Date" id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - name: "Creating Release" uses: "marvinpinto/action-automatic-releases@latest" diff --git a/README.md b/README.md index bbd6a1c..96061bc 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,9 @@ You can get the other version just doing following steps, ### 兼容的 Java 版本 -- Minecraft 1.18 and above +- Minecraft 1.21 and above + - `java-version: "21"` +- Minecraft 1.18 until 1.20 - `java-version: "17"` - Minecraft 1.17 - `java-version: "16"`