From 52ca20491518e3ccbb5d00777c292e475f7731b1 Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Tue, 6 Feb 2024 12:19:36 +0100 Subject: [PATCH] build: Update GH actions --- .github/workflows/early-access.yml | 19 ++++++++++++++----- .github/workflows/release.yml | 16 ++++++++++------ .github/workflows/reusable-build.yml | 25 ++++++++++++------------- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/.github/workflows/early-access.yml b/.github/workflows/early-access.yml index 42b3d25..c5b420d 100644 --- a/.github/workflows/early-access.yml +++ b/.github/workflows/early-access.yml @@ -12,7 +12,12 @@ jobs: VERSION: ${{ steps.vars.outputs.VERSION }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Cancel previous run + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ secrets.GITHUB_TOKEN }} - name: Version id: vars @@ -35,24 +40,28 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: artifact-* + merge-multiple: true + path: out/jreleaser/assemble/helloworld/archive - name: Release uses: jreleaser/release-action@v2 with: - arguments: release -PartifactsDir=artifacts -PskipArchiveResolver + arguments: release env: JRELEASER_PROJECT_VERSION: ${{ needs.precheck.outputs.VERSION }} JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: JReleaser output if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: retention-days: 1 name: jreleaser-release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e4f38e..fdb3040 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,10 @@ jobs: VERSION: ${{ steps.vars.outputs.VERSION }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cancel previous run - uses: styfle/cancel-workflow-action@0.11.0 + uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ secrets.GITHUB_TOKEN }} @@ -40,12 +40,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: artifact-* + merge-multiple: true + path: out/jreleaser/assemble/helloworld/archive - name: Commit version run: | @@ -59,14 +63,14 @@ jobs: - name: Release uses: jreleaser/release-action@v2 with: - arguments: release -PartifactsDir=artifacts -PskipArchiveResolver + arguments: release env: JRELEASER_PROJECT_VERSION: ${{ needs.precheck.outputs.VERSION }} JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: JReleaser output if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jreleaser-release path: | diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index e7688d3..06630f4 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -17,10 +17,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Swift - uses: swift-actions/setup-swift@v1.22.0 + uses: swift-actions/setup-swift@v1 with: swift-version: '5' @@ -36,20 +36,19 @@ jobs: JRELEASER_PROJECT_VERSION: ${{ inputs.version }} JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - retention-days: 1 - name: artifacts - path: | - out/jreleaser/assemble/helloworld/archive/*.zip - - name: JReleaser output if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - retention-days: 1 - name: jreleaser-${{ runner.os }} + name: jreleaser-assemble-${{ runner.os }}-${{ runner.arch }} path: | out/jreleaser/trace.log out/jreleaser/output.properties + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + retention-days: 1 + name: artifact-${{ runner.os }}-${{ runner.arch }} + path: | + out/jreleaser/assemble/helloworld/archive/*.zip