From ef10851e28427e99fdb1078e23a47213f6f307af Mon Sep 17 00:00:00 2001 From: Markus Fleischhacker Date: Thu, 30 May 2024 14:21:24 +0200 Subject: [PATCH 1/2] Upgrade Github actions. --- .github/workflows/codeql.yml | 12 ++++---- .github/workflows/workflow.yml | 52 +++++++++++++++++----------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6ac6677..2117c22 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -38,22 +38,22 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} cache: gradle - name: Verify Gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 18affaa..194d275 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -30,17 +30,17 @@ jobs: name: Build and Test (Windows) steps: - name: Git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} cache: gradle - name: Verify Gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Build run: ./gradlew --info --stacktrace build -x test - name: Test setup @@ -51,13 +51,13 @@ jobs: id: test run: ./gradlew --info --stacktrace test - name: Upload failed test screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: failed-test-screenshots-windows path: build/test-screenshots - name: Publish coverage report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: OS: Windows with: @@ -66,12 +66,12 @@ jobs: - name: Jpackage run: ./gradlew --info --stacktrace jpackage - name: Upload installer (exe) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-installer-windows-exe path: build/jpackage/*.exe - name: Upload image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-portable-windows path: build/jpackage/BoundingBoxEditor @@ -83,25 +83,25 @@ jobs: name: Build and Test (Linux) steps: - name: Git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} cache: gradle - name: Verify Gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: java - name: Build run: ./gradlew --info --stacktrace build -x test - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 - name: Test setup run: | sudo apt-get install xvfb fluxbox @@ -111,13 +111,13 @@ jobs: id: test run: DISPLAY=:10 ./gradlew --stacktrace --info test - name: Upload failed test screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: failed-test-screenshots-linux path: build/test-screenshots - name: Publish coverage report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: OS: Linux with: @@ -126,17 +126,17 @@ jobs: - name: Jpackage run: ./gradlew --info --stacktrace jpackage - name: Upload installer (deb) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-installer-linux-deb path: build/jpackage/*.deb - name: Upload installer (rpm) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-installer-linux-rpm path: build/jpackage/*.rpm - name: Upload image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-portable-linux path: build/jpackage/BoundingBoxEditor @@ -146,24 +146,24 @@ jobs: name: Build and Test (macOS) steps: - name: Git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} cache: gradle - name: Verify Gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Build run: ./gradlew --info --stacktrace build -x test - name: Test id: test run: ./gradlew --info --stacktrace test - name: Publish coverage report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: OS: macOS with: @@ -172,12 +172,12 @@ jobs: - name: Jpackage run: ./gradlew --info --stacktrace jpackage - name: Upload installer (dmg) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-installer-macos-dmg path: build/jpackage/*.dmg - name: Upload image - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: boundingboxeditor-portable-macos path: build/jpackage/BoundingBoxEditor.app @@ -188,7 +188,7 @@ jobs: name: Github Release steps: - name: Git checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Create changelog @@ -210,7 +210,7 @@ jobs: body_text="${body_text//$'\r'/'%0D'}" echo "::set-output name=body::$body_text" - name: Download all build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Prepare artifacts run: | sudo apt-get install rename @@ -222,7 +222,7 @@ jobs: zip -r $image_dir * done - name: Release to github - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From e3ab6841b583826359b8b11170465236e05f8a1f Mon Sep 17 00:00:00 2001 From: Markus Fleischhacker Date: Thu, 30 May 2024 14:40:42 +0200 Subject: [PATCH 2/2] Update codecov action setup. --- .github/workflows/workflow.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 194d275..a46985f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -61,7 +61,9 @@ jobs: env: OS: Windows with: + fail_ci_if_error: true directory: build/reports/ + token: ${{ secrets.CODECOV_TOKEN }} env_vars: OS - name: Jpackage run: ./gradlew --info --stacktrace jpackage @@ -121,7 +123,9 @@ jobs: env: OS: Linux with: + fail_ci_if_error: true directory: build/reports/ + token: ${{ secrets.CODECOV_TOKEN }} env_vars: OS - name: Jpackage run: ./gradlew --info --stacktrace jpackage @@ -167,7 +171,9 @@ jobs: env: OS: macOS with: + fail_ci_if_error: true directory: build/reports/ + token: ${{ secrets.CODECOV_TOKEN }} env_vars: OS - name: Jpackage run: ./gradlew --info --stacktrace jpackage