From 7488a8b3417b5c243ee782f1021240334d3fdc54 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Tue, 18 Nov 2025 19:32:52 +0000 Subject: [PATCH] Dynamically use java 25 for v2 buildscripts and 21 for v1 --- .github/workflows/build-and-test.yml | 32 +++++++++++++++++++--------- .github/workflows/release-tags.yml | 30 ++++++++++++++++++-------- templates/build-and-test.yml | 16 ++++++++++++++ templates/release-tags.yml | 13 +++++++++++ 4 files changed, 72 insertions(+), 19 deletions(-) create mode 100644 templates/build-and-test.yml create mode 100644 templates/release-tags.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6cc51c4..f62bf65 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -31,27 +31,39 @@ jobs: sudo apt-get update -y sudo apt-get install -y mesa-utils xvfb x11-xserver-utils - name: Checkout mod repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Checkout workflows repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: GTNewHorizons/GTNH-Actions-Workflows path: .gtnh-workflows fetch-depth: 0 + - name: Determine JDK versions + id: list-jdk-versions + shell: bash + run: | + ( + echo 'java-versions< "${CHANGELOG_FILE}" - fi + fi cat "${CHANGELOG_FILE}" gh release create "${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" $PRERELEASE ./build/libs/*.jar shell: bash diff --git a/templates/build-and-test.yml b/templates/build-and-test.yml new file mode 100644 index 0000000..aa413c3 --- /dev/null +++ b/templates/build-and-test.yml @@ -0,0 +1,16 @@ +name: Build and test + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + build-and-test: + uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master + secrets: inherit +# with: +# timeout: 150 +# workspace: setupDecompWorkspace +# client-only: false diff --git a/templates/release-tags.yml b/templates/release-tags.yml new file mode 100644 index 0000000..5ae594a --- /dev/null +++ b/templates/release-tags.yml @@ -0,0 +1,13 @@ +name: Release tagged build + +on: + push: + tags: [ '*' ] + +permissions: + contents: write + +jobs: + release-tags: + uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master + secrets: inherit