From 31e41a37ed48de53ba5912bac8ad75f322d56a3c Mon Sep 17 00:00:00 2001 From: Yannik <80621863+vaporvee@users.noreply.github.com> Date: Sat, 5 Oct 2024 06:05:06 +0200 Subject: [PATCH] Update build-neoforge.yml --- .github/workflows/build-neoforge.yml | 34 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-neoforge.yml b/.github/workflows/build-neoforge.yml index fa9c0f2..d97e261 100644 --- a/.github/workflows/build-neoforge.yml +++ b/.github/workflows/build-neoforge.yml @@ -1,23 +1,33 @@ -name: Build - -on: [push, pull_request] +name: Build Neoforge +on: [pull_request, push] jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + # Use these Java versions + java: [21] # Current Java LTS + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - fetch-tags: true - - name: Setup JDK 17 + - name: Setup JDK ${{ matrix.java }} uses: actions/setup-java@v4 with: - java-version: "17" - distribution: "temurin" + java-version: ${{ matrix.java }} + distribution: "microsoft" - - name: Build with Gradle + - name: Make Gradle wrapper executable + run: chmod +x ./neoforge/gradlew + + - name: Build Neoforge Mod working-directory: ./neoforge - run: ./gradlew build + run: ./gradlew build + + - name: Capture build artifacts + if: ${{ matrix.java == '21' }} + uses: actions/upload-artifact@v4 + with: + name: Artifacts + path: ./neoforge/build/libs/