From 261b300f4fe10652ea339ba7218ad5b219291a1e Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 28 Sep 2025 16:48:25 +0100 Subject: [PATCH] Refactor artifact upload in build workflows Replaces multiple uses of actions/upload-artifact with a single custom upload-artifacts action in Linux, macOS, and Windows build workflows. This change simplifies artifact handling and standardizes the upload process across platforms. --- .github/workflows/build-linux.yml | 16 ++++++---------- .github/workflows/build-macos-arm64.yml | 23 ++++++----------------- .github/workflows/build-macos-intel.yml | 17 ++++++----------- .github/workflows/build-windows.yml | 24 ++++++------------------ 4 files changed, 24 insertions(+), 56 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 4a07e594..6a5debf2 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -33,14 +33,10 @@ jobs: - name: Compile Release run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - uses: actions/upload-artifact@v4 + - name: CLI Artifacts + uses: ./.github/actions/upload-artifacts with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.deb - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.zip + chain-network: ${{ inputs.chain-network }} + assets: lethean-* + asset-type: 'cli' + asset-directory: ${{ github.workspace }}/build/release/packages diff --git a/.github/workflows/build-macos-arm64.yml b/.github/workflows/build-macos-arm64.yml index 004d94dc..28cdb67a 100644 --- a/.github/workflows/build-macos-arm64.yml +++ b/.github/workflows/build-macos-arm64.yml @@ -34,22 +34,11 @@ jobs: - name: Compile Release run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.pkg - - uses: actions/upload-artifact@v4 + - name: CLI Artifacts + uses: ./.github/actions/upload-artifacts with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.zip - -# - name: CLI Artifacts -# uses: ./.github/actions/upload-artifacts -# with: -# chain-network: ${{ inputs.chain-network }} -# assets: lethean-* -# asset-type: 'cli' -# asset-directory: ${{ github.workspace }}/build/apple-clang-armv8/src \ No newline at end of file + chain-network: ${{ inputs.chain-network }} + assets: lethean-* + asset-type: 'cli' + asset-directory: ${{ github.workspace }}/build/release/packages diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml index ef4dbbf9..28ccd11a 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -30,15 +30,10 @@ jobs: - name: Compile Release run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - uses: actions/upload-artifact@v4 + - name: CLI Artifacts + uses: ./.github/actions/upload-artifacts with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.pkg - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.zip - + chain-network: ${{ inputs.chain-network }} + assets: lethean-* + asset-type: 'cli' + asset-directory: ${{ github.workspace }}/build/release/packages diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index e95b57ba..b9a86dc0 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -30,22 +30,10 @@ jobs: - name: Compile Release run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - uses: actions/upload-artifact@v4 + - name: CLI Artifacts + uses: ./.github/actions/upload-artifacts with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.msi - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz - - - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/build/release/packages/lethean-*.zip - -# - name: CLI Artifacts -# uses: ./.github/actions/upload-artifacts -# with: -# chain-network: ${{ inputs.chain-network }} -# assets: lethean-* -# asset-type: 'cli' -# asset-directory: ${{ github.workspace }}/build/release/packages + chain-network: ${{ inputs.chain-network }} + assets: lethean-* + asset-type: 'cli' + asset-directory: ${{ github.workspace }}/build/release/packages