From 5c1545c077c57f648714d055691fc3077f56ef4d Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Thu, 29 Feb 2024 07:05:43 +0800 Subject: [PATCH] Update GH Actions Action versions were bumped to account for Node.js 20, and the custom caching actions were replaced with Gradle's new setup-gradle action. --- .github/workflows/build.yml | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13dc53a1..506a3453 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: gradle/wrapper-validation-action@v1 + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v2 build: name: "Build using Gradle" @@ -19,33 +19,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' check-latest: true - - name: Cache ForgeGradle and Librarian caches - uses: actions/cache@v3 + - uses: gradle/actions/setup-gradle@v3 with: - path: | - ~/.gradle/caches/forge_gradle/** - !~/.gradle/caches/forge_gradle/assets - ~/.gradle/caches/parchmentgradle - key: ${{ runner.os }}-gradle-mc-caches-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/*versions.toml') }} - restore-keys: | - ${{ runner.os }}-gradle-mc-caches- - - uses: burrunan/gradle-cache-action@v1 - with: - arguments: build # Read-only cache if not on repo's default branch: https://stackoverflow.com/a/68414395 - read-only: ${{ format('refs/heads/{0}', github.event.repository.default_branch) != github.ref }} - gradle-dependencies-cache-key: | - gradle/libs.versions.toml - gradle-distribution-sha-256-sum-warning: false - - uses: actions/upload-artifact@v3 + cache-read-only: ${{ format('refs/heads/{0}', github.event.repository.default_branch) != github.ref }} + - run: ./gradlew build + - uses: actions/upload-artifact@v4 with: name: Build artifacts path: build/libs/*.jar \ No newline at end of file