From 4809624f0c6b2620488f5f12aa1020548ed436d2 Mon Sep 17 00:00:00 2001 From: BianXiao <137746769+mcbianxiao@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:36:07 +0800 Subject: [PATCH] Update build-commit.yml --- .github/workflows/build-commit.yml | 31 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index d200b8f9ee..ad970f7c8e 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -15,26 +15,27 @@ jobs: run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT id: ref - name: Checkout sources - uses: actions/checkout@v3 - - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/checkout@v4 + + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@v3 + + - name: Setup Java 21 + uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: temurin java-version: 21 - - name: Initialize caches - uses: actions/cache@v3 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-commit-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build-commit- - - name: Build artifacts + cache-read-only: false + + - name: Execute Gradle build run: ./gradlew build + - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sodium-artifacts-${{ steps.ref.outputs.branch }} path: build/libs/*.jar