chore: GitHub Actionの改善

This commit is contained in:
usbharu 2023-09-30 14:29:32 +09:00
parent 401f5e103c
commit 88a9919ff7
1 changed files with 31 additions and 10 deletions

View File

@ -20,13 +20,34 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3 - uses: actions/cache@2
with: with:
java-version: '17' path: ~/.gradle/wrapper
distribution: 'temurin' key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Build with Gradle - uses: actions/cache@2
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 with:
with: path: |
arguments: test ~/.gradle/caches/jars-*
~/.gradle/caches/transforms-*
~/.gradle/caches/modules-*
key: gradle-dependencies-${{ steps.cache-key.outputs.week }}-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: gradle-dependencies-${{ steps.cache-key.outputs.week }}-
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches/build-cache-*
~/.gradle/caches/[0-9]*.*
.gradle
key: ${{ runner.os }}-gradle-build-${{ github.workflow }}-${{ steps.cache-key.outputs.week }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle-build-${{ github.workflow }}-${{ steps.cache-key.outputs.week }}-
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Gradle Build Action
uses: gradle/gradle-build-action@v2.8.1
with:
arguments: test