Skip to content

Commit

Permalink
use actions/cache instead of setup-java's cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Johni0702 committed Sep 12, 2023
1 parent c80efe5 commit baf5d72
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: |
8
16
17
cache: gradle
# Can't use setup-java for this because https://github.com/actions/setup-java/issues/366
- uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle.properties', 'gradle/*.versions.toml') }}
restore-keys: |
gradle-caches-${{ hashFiles('**/*.gradle*') }}
gradle-caches-
- name: Setup environment
run: |
Expand All @@ -32,7 +45,7 @@ jobs:
echo "org.gradle.workers.max=2" >> "$GRADLE_USER_HOME/gradle.properties"
- name: Build
run: ./gradlew build --stacktrace
run: ./gradlew clean --stacktrace

- name: Publish
run: echo ./gradlew publish --stacktrace
Expand Down

0 comments on commit baf5d72

Please sign in to comment.