Skip to content

Commit

Permalink
build: Update GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 6, 2024
1 parent f5b8b29 commit ba1a66d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 29 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,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 }}

Expand Down Expand Up @@ -55,24 +55,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:
name: jreleaser-release
path: |
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -52,12 +52,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: |
Expand All @@ -71,14 +75,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: |
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/reusable-assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
assemble:
name: 'Assemble ${{ matrix.platform }}'
name: 'Assemble ${{ matrix.job.platform }}'
strategy:
fail-fast: true
matrix:
Expand All @@ -24,22 +24,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: artifacts
pattern: binaries-all
merge-multiple: true
path: bin

- name: Download osx-arm artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: artifacts-osx-arm
name: binaries-osx-arm
merge-multiple: true
path: bin/osx-arm64

- name: Add executable permissions
run: chmod +x bin/**/*
run: |
ls -l bin/**/*
chmod +x bin/**/*
- name: Assemble
uses: jreleaser/release-action@v2
Expand All @@ -50,10 +54,19 @@ jobs:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_PLATFORM_OVERRIDE: ${{ matrix.job.platform }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-assemble-${{ matrix.job.platform }}
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: artifacts
name: artifact-${{ matrix.job.platform }}
path: |
out/jreleaser/assemble/helloworld/archive/*.zip
8 changes: 4 additions & 4 deletions .github/workflows/reusable-build-osx-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dotnet
uses: actions/setup-dotnet@v3.0.2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0'

Expand All @@ -32,9 +32,9 @@ jobs:
codesign -f -s - bin/osx-arm64/helloworld
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: artifacts-osx-arm
name: binaries-osx-arm
path: |
bin/osx-arm64/helloworld
8 changes: 4 additions & 4 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dotnet
uses: actions/setup-dotnet@v3.0.2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0'

Expand All @@ -31,9 +31,9 @@ jobs:
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: artifacts
name: binaries-all
path: |
bin

0 comments on commit ba1a66d

Please sign in to comment.