Skip to content

Commit

Permalink
Use setup action provided by Gradle for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
JojOatXGME committed May 1, 2024
1 parent 294ecc5 commit 3db52d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,11 @@ jobs:
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
# Setup caches and collect metadata
- name: Setup cache for Gradle and dependencies
uses: actions/cache@v4
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: "gradle-\
${{runner.os}}-\
${{hashFiles('gradle/wrapper/gradle-wrapper.properties')}}-\
${{hashFiles('gradle.properties', '**/*.gradle.kts')}}"
gradle-home-cache-cleanup: true
# Collect metadata and setup caches for Plugin Verifier
- name: Collect metadata for upcoming steps and jobs
run: ./gradlew --stacktrace metadata listProductsReleases
- name: Setup cache for IntelliJ Plugin Verifier
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
with:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: true
# Fail if the release was not triggered from the master branch
- name: Verify branch
if: github.event_name == 'release'
Expand All @@ -40,17 +44,6 @@ jobs:
echo "::error::$msg"
exit 1
fi
# Setup cache
- name: Setup cache for Gradle and dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: "gradle-\
${{runner.os}}-\
${{hashFiles('gradle/wrapper/gradle-wrapper.properties')}}-\
${{hashFiles('gradle.properties', '**/*.gradle.kts')}}"
# Update files
- name: Obtain release notes
uses: actions/github-script@v7
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/publish-to-jetbrains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,10 @@ jobs:
with:
java-version: 17
distribution: temurin
# Setup cache
- name: Setup cache for Gradle and dependencies
uses: actions/cache@v4
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: "gradle-\
${{runner.os}}-\
${{hashFiles('gradle/wrapper/gradle-wrapper.properties')}}-\
${{hashFiles('gradle.properties', '**/*.gradle.kts')}}"
cache-read-only: true
# Build and publish
- name: Obtain release notes
uses: actions/github-script@v7
Expand Down

0 comments on commit 3db52d4

Please sign in to comment.