From 18b1defb766065d237cb7723af773084c8148b81 Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Mon, 4 Apr 2022 12:27:00 -0700 Subject: [PATCH] Update java version in actions Add temurin and zulu distribution to matrix Allow running build action on workflow_dispatch --- .github/workflows/build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63cda10..d4c5e3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,15 +4,19 @@ # against bad commits. name: build -on: [pull_request, push] +on: [pull_request, push, workflow_dispatch] jobs: build: strategy: matrix: + distribution: [ + temurin, + zulu + ] # Use these Java versions java: [ - 16 # Minimum supported by Minecraft + 17 # Minimum supported by Minecraft ] # and run on both Linux and Windows os: [ubuntu-20.04, windows-latest] @@ -25,6 +29,7 @@ jobs: - name: setup jdk ${{ matrix.java }} uses: actions/setup-java@v1 with: + distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java }} - name: make gradle wrapper executable if: ${{ runner.os != 'Windows' }} @@ -32,7 +37,7 @@ jobs: - name: build run: ./gradlew build - name: capture build artifacts - if: ${{ runner.os == 'Linux' && matrix.java == '16' }} # Only upload artifacts built from LTS java on one OS + if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from LTS java on one OS uses: actions/upload-artifact@v2 with: name: Artifacts