From 4e30f7b5b20e4da1f9735f580abd1178dbd40f4a Mon Sep 17 00:00:00 2001 From: LambdAurora Date: Mon, 5 Feb 2024 23:57:24 +0100 Subject: [PATCH] Update CI workflows. --- .github/workflows/release.yml | 23 ++++++++++++----------- .github/workflows/test.yml | 19 +++++++++++-------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09eb2b8..db9f132 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,28 +9,29 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - name: "Checkout" + uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - name: "Set up Java" + uses: actions/setup-java@v3 with: distribution: "temurin" java-version: 17 - - name: Gradle Build - uses: gradle/gradle-build-action@v2 - with: - arguments: build check --stacktrace --parallel + - name: "Set up Gradle" + uses: gradle/actions/setup-gradle@v3 + - name: "Gradle Build" + run: ./gradlew build check --stacktrace --parallel env: ACTIONS_REF: ${{ github.ref }} - - uses: actions/upload-artifact@v3 + - name: "Upload artifacts" + uses: actions/upload-artifact@v4 with: name: Artifacts path: ./build/libs/ - - name: Gradle Publish - uses: gradle/gradle-build-action@v2 - with: - arguments: publish publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace + - name: "Gradle Publish" + run: ./gradlew publish publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace env: ACTIONS_REF: ${{ github.ref }} ORG_GRADLE_PROJECT_mavenCentralKey: ${{ secrets.MAVEN_CENTRAL_PUBLISH_KEY }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e556f3..48e3d45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,18 +8,21 @@ jobs: java: [17, 21] runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - name: "Checkout" + uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - name: "Set up Java" + uses: actions/setup-java@v4 with: distribution: "temurin" java-version: ${{ matrix.java }} - - name: Gradle Build and Test - uses: gradle/gradle-build-action@v2 + - name: "Set up Gradle" + uses: gradle/actions/setup-gradle@v3 + - name: "Gradle Build and Test" + run: ./gradlew build check --stacktrace --parallel + - name: "Upload artifacts" + uses: actions/upload-artifact@v4 with: - arguments: build check --stacktrace --parallel - - uses: actions/upload-artifact@v3 - with: - name: Artifacts + name: Artifacts_j${{ matrix.java }} path: ./build/libs/