fixed CI
Some checks failed
Build and Release / build (0.106.1+1.21.2, 1.21.2, 1.21.2+build.1) (push) Failing after 5m12s
Build and Release / build (0.114.1+1.21.3, 1.21.3, 1.21.3+build.2) (push) Failing after 6m31s
Build and Release / build (0.134.1+1.21.9, 1.21.9, 1.21.9+build.1) (push) Failing after 1m59s
Build and Release / build (0.141.3+1.21.11, 1.21.11, 1.21.11+build.4) (push) Failing after 10m33s
Build and Release / build (0.138.4+1.21.10, 1.21.10, 1.21.10+build.3) (push) Failing after 10m38s
Build and Release / build (0.136.1+1.21.8, 1.21.8, 1.21.8+build.1) (push) Failing after 10m43s
Build and Release / build (0.129.0+1.21.7, 1.21.7, 1.21.7+build.8) (push) Failing after 11m39s
Build and Release / build (0.128.2+1.21.6, 1.21.6, 1.21.6+build.1) (push) Failing after 11m45s
Build and Release / build (0.128.2+1.21.5, 1.21.5, 1.21.5+build.1) (push) Failing after 11m49s
Build and Release / build (0.119.4+1.21.4, 1.21.4, 1.21.4+build.8) (push) Failing after 11m55s
Build and Release / build (0.116.10+1.21.1, 1.21.1, 1.21.1+build.3) (push) Failing after 11m59s
Build and Release / publish (push) Has been cancelled

This commit is contained in:
2026-04-07 19:03:55 -05:00
parent 96448073e8
commit 9cd722d585

View File

@@ -17,13 +17,47 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: gradle:8.11.1-jdk21 image: gradle:8.11.1-jdk21
strategy:
fail-fast: false
matrix:
include:
- minecraft_version: "1.21.1"
yarn_mappings: "1.21.1+build.3"
fabric_version: "0.116.10+1.21.1"
- minecraft_version: "1.21.2"
yarn_mappings: "1.21.2+build.1"
fabric_version: "0.106.1+1.21.2"
- minecraft_version: "1.21.3"
yarn_mappings: "1.21.3+build.2"
fabric_version: "0.114.1+1.21.3"
- minecraft_version: "1.21.4"
yarn_mappings: "1.21.4+build.8"
fabric_version: "0.119.4+1.21.4"
- minecraft_version: "1.21.5"
yarn_mappings: "1.21.5+build.1"
fabric_version: "0.128.2+1.21.5"
- minecraft_version: "1.21.6"
yarn_mappings: "1.21.6+build.1"
fabric_version: "0.128.2+1.21.6"
- minecraft_version: "1.21.7"
yarn_mappings: "1.21.7+build.8"
fabric_version: "0.129.0+1.21.7"
- minecraft_version: "1.21.8"
yarn_mappings: "1.21.8+build.1"
fabric_version: "0.136.1+1.21.8"
- minecraft_version: "1.21.9"
yarn_mappings: "1.21.9+build.1"
fabric_version: "0.134.1+1.21.9"
- minecraft_version: "1.21.10"
yarn_mappings: "1.21.10+build.3"
fabric_version: "0.138.4+1.21.10"
- minecraft_version: "1.21.11"
yarn_mappings: "1.21.11+build.4"
fabric_version: "0.141.3+1.21.11"
env: env:
GITEA_TOKEN: ${{ github.token }} GITEA_TOKEN: ${{ github.token }}
GITEA_API_URL: ${{ github.server_url }}/api/v1 GITEA_API_URL: ${{ github.server_url }}/api/v1
GITEA_REPO: ${{ github.repository }}
GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git
GITEA_REF_NAME: ${{ github.ref_name }}
GITEA_SHA: ${{ github.sha }}
steps: steps:
- name: Prepare source - name: Prepare source
shell: bash shell: bash
@@ -35,62 +69,68 @@ jobs:
clone --depth 1 "${GITEA_REPO_URL}" . clone --depth 1 "${GITEA_REPO_URL}" .
fi fi
- name: Build all supported 1.21 releases - name: Build
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
release_dir="versioned-jars" echo "Building Minecraft ${{ matrix.minecraft_version }}"
gradle --no-daemon clean build \
-Pminecraft_version="${{ matrix.minecraft_version }}" \
-Pyarn_mappings="${{ matrix.yarn_mappings }}" \
-Pfabric_version="${{ matrix.fabric_version }}"
build_version() { mkdir -p release-artifacts
local minecraft_version="$1"
local yarn_mappings="$2"
local fabric_version="$3"
local jar_name="sign-leak-shield-${minecraft_version}.jar"
echo "Building Minecraft ${minecraft_version}" jar_path=""
gradle --no-daemon clean build \ shopt -s nullglob
-Pminecraft_version="${minecraft_version}" \ for candidate in build/libs/*.jar; do
-Pyarn_mappings="${yarn_mappings}" \ case "$(basename "${candidate}")" in
-Pfabric_version="${fabric_version}" *-sources.jar|*-dev.jar)
continue
;;
esac
mkdir -p "${release_dir}" jar_path="${candidate}"
break
done
jar_path="" if [ -z "${jar_path}" ]; then
shopt -s nullglob echo "No build jar found for Minecraft ${{ matrix.minecraft_version }}"
for candidate in build/libs/*.jar; do exit 1
case "$(basename "${candidate}")" in fi
*-sources.jar|*-dev.jar)
continue
;;
esac
jar_path="${candidate}" cp "${jar_path}" "release-artifacts/sign-leak-shield-${{ matrix.minecraft_version }}.jar"
break
done
if [ -z "${jar_path}" ]; then - name: Upload build artifact
echo "No build jar found for Minecraft ${minecraft_version}" uses: actions/upload-artifact@v4
exit 1 with:
fi name: sign-leak-shield-${{ matrix.minecraft_version }}
path: release-artifacts/sign-leak-shield-${{ matrix.minecraft_version }}.jar
if-no-files-found: error
retention-days: 7
cp "${jar_path}" "${release_dir}/${jar_name}" publish:
} needs: build
if: github.event_name != 'pull_request'
build_version "1.21.1" "1.21.1+build.3" "0.116.10+1.21.1" runs-on: ubuntu-latest
build_version "1.21.2" "1.21.2+build.1" "0.106.1+1.21.2" container:
build_version "1.21.3" "1.21.3+build.2" "0.114.1+1.21.3" image: gradle:8.11.1-jdk21
build_version "1.21.4" "1.21.4+build.8" "0.119.4+1.21.4" env:
build_version "1.21.5" "1.21.5+build.1" "0.128.2+1.21.5" GITEA_TOKEN: ${{ github.token }}
build_version "1.21.6" "1.21.6+build.1" "0.128.2+1.21.6" GITEA_API_URL: ${{ github.server_url }}/api/v1
build_version "1.21.7" "1.21.7+build.8" "0.129.0+1.21.7" GITEA_REPO: ${{ github.repository }}
build_version "1.21.8" "1.21.8+build.1" "0.136.1+1.21.8" GITEA_REF_NAME: ${{ github.ref_name }}
build_version "1.21.9" "1.21.9+build.1" "0.134.1+1.21.9" GITEA_SHA: ${{ github.sha }}
build_version "1.21.10" "1.21.10+build.3" "0.138.4+1.21.10" steps:
build_version "1.21.11" "1.21.11+build.4" "0.141.3+1.21.11" - name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: versioned-jars
pattern: sign-leak-shield-*
merge-multiple: true
- name: Publish Gitea release - name: Publish Gitea release
if: github.event_name != 'pull_request'
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
@@ -98,7 +138,7 @@ jobs:
shopt -s nullglob shopt -s nullglob
jar_paths=(versioned-jars/*.jar) jar_paths=(versioned-jars/*.jar)
if [ "${#jar_paths[@]}" -eq 0 ]; then if [ "${#jar_paths[@]}" -eq 0 ]; then
echo "No versioned jars were built" echo "No build artifacts were downloaded"
exit 1 exit 1
fi fi
@@ -112,7 +152,7 @@ jobs:
prerelease=false prerelease=false
fi fi
release_payload="$(printf '{"tag_name":"%s","name":"%s","body":"Automated multi-version build for 1.21.1-1.21.11.","draft":false,"prerelease":%s}' \ release_payload="$(printf '{"tag_name":"%s","name":"%s","body":"Automated parallel build for Minecraft 1.21.1 through 1.21.11.","draft":false,"prerelease":%s}' \
"${release_tag}" "${release_name}" "${prerelease}")" "${release_tag}" "${release_name}" "${prerelease}")"
release_json="$(curl -fsS \ release_json="$(curl -fsS \