Skip to content

Commit

Permalink
Updates for Minecraft 1.21 (#4)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Taskeren authored Jun 25, 2024
1 parent ed12797 commit 59b51b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/buildspigot-buildtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- cron: "0 0 6,12,18,24,30 * *"

workflow_dispatch:
push:

jobs:
build:
Expand All @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 59b51b1

Please sign in to comment.