workflow: using gradle from $PATH, update cache usage

* use cache for default build
* disable cache for release build
This commit is contained in:
Puqns67 2024-06-14 00:53:19 +08:00
parent 36d7fff87e
commit 528cb3f0c6
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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 }}