Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/auto-beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Auto Beta Release

# Each push to the upgrade branch produces a new release tagged
# 26.1.2-beta.<N>, where N auto-increments from the highest existing tag.
# Also opens a PR back to the default branch on first push if one
# doesn't exist yet.

on:
push:
branches:
- claude/minecraft-26.1.2-upgrade-6YV9K

concurrency:
group: auto-beta-release
cancel-in-progress: false

permissions:
contents: write
pull-requests: write

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Ensure pull request exists
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_BRANCH: ${{ github.ref_name }}
BASE_BRANCH: ${{ github.event.repository.default_branch }}
run: |
set -euo pipefail
existing=$(gh pr list --head "${HEAD_BRANCH}" --base "${BASE_BRANCH}" --state open --json number --jq 'length')
if [ "${existing}" = "0" ]; then
gh pr create \
--base "${BASE_BRANCH}" \
--head "${HEAD_BRANCH}" \
--title "feat: add Minecraft 26.1.2 support for Spigot/Paper" \
--body "$(printf '## Summary\n- Adds bukkit-helper-26-1-2 module modeled on 1.21.11, using paperweight.userdev with the 26.1.2-R0.1-SNAPSHOT Paper dev bundle.\n- Compiles the new module with Java 25 (required by MC 26.1+).\n- Routes (MC: 26.*) servers to the new helper in spigot/Helper.java.\n- Wires the new module into settings.gradle and spigot/build.gradle (impl + shadowJar include).\n- ci(release): adds JDK 25 alongside JDK 21 so paperweight can resolve the 26.1.2 toolchain.\n- ci(auto-beta-release): on each push, computes next 26.1.2-beta.<N> tag, builds, and publishes a GitHub Release with the spigot JAR.\n\n## Test plan\n- [ ] Gradle :spigot:build succeeds (JDK 21 host with JDK 25 toolchain).\n- [ ] Paper dev bundle 26.1.2-R0.1-SNAPSHOT resolves from PaperMC repo.\n- [ ] Auto-beta-release workflow tags 26.1.2-beta.<N> and uploads the spigot jar.\n- [ ] Manual smoke test on a Paper/Spigot 26.1.2 server.')" \
--draft || true
else
echo "PR already exists for ${HEAD_BRANCH} -> ${BASE_BRANCH}; skipping."
fi

- name: Compute next beta version
id: version
run: |
set -euo pipefail
BASE="26.1.2-beta"
git fetch --tags --force
LAST=$(git tag --list "${BASE}.*" \
| sed -E "s/^${BASE}\.([0-9]+)$/\1/" \
| grep -E '^[0-9]+$' \
| sort -n \
| tail -n1 || true)
if [ -z "${LAST}" ]; then
NEXT=1
else
NEXT=$((LAST + 1))
fi
TAG="${BASE}.${NEXT}"
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
echo "Next tag: ${TAG}"

- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'

- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
cache: gradle

- name: Build with Gradle
env:
USERNAME: ${{ secrets.USERNAME }}
TOKEN: ${{ secrets.TOKEN }}
# Run Gradle on JDK 21 (compatible with Shadow plugin); JDK 25 used via toolchain.
JAVA_HOME: ${{ env.JAVA_HOME_21_X64 }}
run: |
./gradlew :spigot:build \
-Porg.gradle.java.installations.paths="${JAVA_HOME_25_X64},${JAVA_HOME_21_X64}"

- name: Find JAR file
id: find_jar
run: |
set -euo pipefail
JAR_FILE=$(ls target/*.jar | grep 'spigot' | tail -n 1)
echo "jar_file=${JAR_FILE}" >> "$GITHUB_OUTPUT"
echo "jar_name=$(basename "${JAR_FILE}")" >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.version.outputs.tag }}
JAR_FILE: ${{ steps.find_jar.outputs.jar_file }}
run: |
set -euo pipefail
gh release create "${TAG}" "${JAR_FILE}" \
--target "${GITHUB_SHA}" \
--title "${TAG}" \
--notes "Automated beta release for Minecraft 26.1.2 (commit ${GITHUB_SHA})." \
--prerelease
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,23 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'

- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
cache: gradle

- name: Build with Gradle
env:
USERNAME: ${{ secrets.USERNAME }}
TOKEN: ${{ secrets.TOKEN }}
run: ./gradlew :spigot:build
# Run Gradle on JDK 21 (compatible with Shadow plugin); JDK 25 used via toolchain.
JAVA_HOME: ${{ env.JAVA_HOME_21_X64 }}
run: |
./gradlew :spigot:build \
-Porg.gradle.java.installations.paths="${JAVA_HOME_25_X64},${JAVA_HOME_21_X64}"

- name: Find JAR file
id: find_jar
Expand Down
24 changes: 24 additions & 0 deletions bukkit-helper-26-1-2/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id 'io.papermc.paperweight.userdev'
}

eclipse {
project {
name = "Dynmap(Spigot-26.1.2)"
}
}

description = 'bukkit-helper-26.1.2'

// MC 26.1+ requires Java 25.
java {
toolchain.languageVersion = JavaLanguageVersion.of(25)
}

dependencies {
implementation project(':bukkit-helper')
implementation project(':dynmap-api')
implementation project(path: ':DynmapCore', configuration: 'shadow')
// Use paperweight dev bundle (matches the pattern used by bukkit-helper-121-11).
paperweight.paperDevBundle("26.1.2-R0.1-SNAPSHOT")
}
Loading
Loading