From 4c3cccde8797abd79992c5703ebe37245be130e3 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 54b6f11..16817f6 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 6d28ef5..9a124d6 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 }}