From 7e6d211728a7f9bad5096cb432b9fd4cd00b22a7 Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Tue, 6 Feb 2024 11:05:38 +0100 Subject: [PATCH] build: Update GH actions --- .github/workflows/early-access.yml | 21 +++++++++++++++------ .github/workflows/release.yml | 16 ++++++++++------ .github/workflows/reusable-build.yml | 23 +++++++++++------------ jreleaser.yml | 4 ++-- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/.github/workflows/early-access.yml b/.github/workflows/early-access.yml index 06664f4..24796b8 100644 --- a/.github/workflows/early-access.yml +++ b/.github/workflows/early-access.yml @@ -12,8 +12,13 @@ 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 shell: bash @@ -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 62020f3..08fdfe6 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 cce9837..4787431 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -17,7 +17,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Crystal uses: crystal-lang/install-crystal@v1 @@ -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 diff --git a/jreleaser.yml b/jreleaser.yml index ab221d3..c138077 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -4,8 +4,8 @@ environment: project: name: helloworld - description: HelloWorld in Zig - longDescription: HelloWorld in Zig + description: HelloWorld in Crystal + longDescription: HelloWorld in Crystal links: homepage: https://github.com/jreleaser/helloworld-crystal authors: