Skip to content

Commit bab7c21

Browse files
committed
chore: cache builds
1 parent 7fe1830 commit bab7c21

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,21 @@ jobs:
3434
- name: Setup Gradle
3535
uses: gradle/gradle-build-action@v2
3636

37+
- uses: actions/cache@v4
38+
with:
39+
path: |
40+
.gradle/loom-cache
41+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}
42+
restore-keys: ${{ runner.os }}-gradle-${{ matrix.java }}-
43+
3744
- name: Execute Gradle build
3845
env:
3946
STORAGE_TYPE: ${{ matrix.storageType }}
4047
run: ./gradlew build --info
4148

4249
- name: Publish to Maven Central
4350
# only publish once
44-
if: github.ref == 'refs/heads/master' && matrix.java == '8' && matrix.storageType == 'h2'
51+
if: github.ref == 'refs/heads/master' && matrix.java == '21' && matrix.storageType == 'mariadb'
4552
env:
4653
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
4754
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}

0 commit comments

Comments
 (0)