From 5192fb56ed9eca5b2f2b1babb226d4fb386522e9 Mon Sep 17 00:00:00 2001 From: Gabriel Harris-Rouquette Date: Sun, 12 May 2024 21:36:49 -0700 Subject: [PATCH] fix: Attempt to update workflows to build 1.16.5 Workflow actions tend to get outdated after we end suuport. Fixes #4007 Signed-off-by: Gabriel Harris-Rouquette --- .github/workflows/build-project.yaml | 31 ++++++++++++++++----------- .github/workflows/deploy.yaml | 32 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index fde028929d3..12f890a2d08 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -19,10 +19,10 @@ jobs: if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}" runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -34,12 +34,12 @@ jobs: restore-keys: | ${{ runner.os }}-minecraft-${{ env.CACHE_REV }}- - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Setup workspace run: | echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV @@ -49,7 +49,7 @@ jobs: env: CI_SYSTEM: Github Actions - name: Archive artifacts for build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Sponge Jars path: | @@ -58,17 +58,17 @@ jobs: ${{ github.workspace }}/vanilla/build/libs/*.jar ${{ github.workspace }}/forge/build/libs/*.jar - name: SpongeVanilla Production Jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SpongeVanilla Production Jar path: "${{ github.workspace }}/vanilla/build/libs/*-universal.jar" - name: SpongeForge Production Jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SpongeForge Production Jar path: "${{ github.workspace }}/forge/build/libs/*-universal.jar" - name: SpongeVanilla libraries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SpongeVanilla installer libraries path: "${{ github.workspace }}/vanilla/build/resources/installer/libraries.json" @@ -80,29 +80,34 @@ jobs: matrix: os: [ubuntu-22.04, windows-latest, macos-latest] java: [8, 11, 16] + exclude: + - os: macos-latest + java: 8 + - os: macos-latest + java: 16 runs-on: "${{ matrix.os }}" steps: - name: Check out repository to use the build.gradle.kts as a hash file - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: code - name: Download SpongeVanilla libraries as an additional hash file - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: SpongeVanilla installer libraries path: "${{ github.workspace }}/code/libraries.json" - name: "Setup JDK ${{ matrix.java }}" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: "${{ matrix.java }}" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: "${{ github.workspace}}/libraries" key: "${{runner.os}}-${{matrix.java}}-it-libraries-${{ hashFiles('code/build.gradle.kts') }}-${{ github.workspace }}/code/libraries.json" restore-keys: "${{runner.os}}-${{matrix.java}}-it-libraries-" - name: Download SpongeVanilla server - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: SpongeVanilla Production Jar - name: Run SpongeVanilla Test (windows) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 86c4ef774a2..cd8f767a7d8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -14,10 +14,10 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -29,12 +29,12 @@ jobs: restore-keys: | ${{ runner.os }}-minecraft-${{ env.CACHE_REV }}- - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Setup workspace run: | echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV @@ -45,7 +45,7 @@ jobs: env: CI_SYSTEM: Github Actions - name: Archive artifacts for build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Sponge Jars path: | @@ -54,17 +54,17 @@ jobs: ${{ github.workspace }}/vanilla/build/libs/*.jar ${{ github.workspace }}/forge/build/libs/*.jar - name: SpongeVanilla Production Jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SpongeVanilla Production Jar path: "${{ github.workspace }}/vanilla/build/libs/*-universal.jar" - name: SpongeForge Production Jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SpongeForge Production Jar path: "${{ github.workspace }}/forge/build/libs/*-universal.jar" - name: SpongeVanilla libraries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SpongeVanilla installer libraries path: "${{ github.workspace }}/vanilla/build/resources/installer/libraries.json" @@ -79,26 +79,26 @@ jobs: runs-on: "${{ matrix.os }}" steps: - name: Check out repository to use the build.gradle.kts as a hash file - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: code - name: Download SpongeVanilla libraries as an additional hash file - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: SpongeVanilla installer libraries path: "${{ github.workspace }}/code/libraries.json" - name: "Setup JDK ${{ matrix.java }}" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: "${{ matrix.java }}" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: "${{ github.workspace}}/libraries" key: "${{runner.os}}-${{matrix.java}}-it-libraries-${{ hashFiles('code/build.gradle.kts') }}-${{ github.workspace }}/code/libraries.json" restore-keys: "${{runner.os}}-${{matrix.java}}-it-libraries-" - name: Download SpongeVanilla server - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: SpongeVanilla Production Jar - name: Run SpongeVanilla Test (windows) @@ -111,10 +111,10 @@ jobs: needs: integrationTest runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -126,7 +126,7 @@ jobs: restore-keys: | ${{ runner.os }}-minecraft-${{ env.CACHE_REV }}- - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11