From 528cb3f0c608fa5126fd5c10d86f03eee4f80448 Mon Sep 17 00:00:00 2001 From: Puqns67 Date: Fri, 14 Jun 2024 00:53:19 +0800 Subject: [PATCH] workflow: using gradle from $PATH, update cache usage * use cache for default build * disable cache for release build --- .github/workflows/build.yaml | 4 +++- .github/workflows/release.yaml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb6d086..a7bf7be 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,9 +23,11 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 + with: + cache-read-only: false - name: Build with Gradle - run: ./gradlew build + run: gradle build - name: Upload build artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4e13d5b..8ad7342 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,11 +21,13 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 + with: + cache-disabled: true - name: Build with Gradle - run: ./gradlew build + run: gradle build - name: Upload to modrinth with Gradle - run: ./gradlew modrinth + run: gradle modrinth env: MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}