From e8281f440fc250c8c642940f97a60cdfc660fa35 Mon Sep 17 00:00:00 2001 From: osfanbuff63 <91388253+osfanbuff63@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:44:47 -0400 Subject: [PATCH 1/3] Improve build workflow This adds a matrix, to make MC updating Java easier, updates Java to 17 (as it was 1.8 lol), adds the `cache` parameter to the setup java step (This should improve build time), and updates the various actions to the latest stable versions. --- .github/workflows/build.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38dcf29..a73936f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Gradle build +name: Build with Gradle on: push: @@ -8,15 +8,18 @@ on: jobs: build: - runs-on: ubuntu-latest - + strategy: + matrix: + java: [17] # This is for easier updating in the future if MC updates Java again steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: ${{ matrix.java }} + distribution: temurin + cache: gradle - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle From e5050de31cc582e10455e779e3a433b693b8e782 Mon Sep 17 00:00:00 2001 From: osfanbuff63 <91388253+osfanbuff63@users.noreply.github.com> Date: Wed, 8 Jun 2022 17:09:00 -0400 Subject: [PATCH 2/3] Fix invalid version Also add `fail-fast: false` --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a73936f..416e86d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,12 +10,13 @@ jobs: build: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [17] # This is for easier updating in the future if MC updates Java again steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} distribution: temurin From 5f25194dcd72531b5489267bd5d5180c7d8bd438 Mon Sep 17 00:00:00 2001 From: osfanbuff63 <91388253+osfanbuff63@users.noreply.github.com> Date: Wed, 8 Jun 2022 17:12:36 -0400 Subject: [PATCH 3/3] Add `workflow_dispatch` trigger This allows the workflow to be triggered manually --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 416e86d..6c78975 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + workflow_dispatch: jobs: build: