From 09f37349b8dd1839ddd28b22912cc58ae7febbed Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Thu, 16 May 2024 07:17:01 -0700 Subject: [PATCH] ci: fix publish --- .github/workflows/publish.yml | 69 ++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f66d6fe0..3abecd311 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,6 @@ on: concurrency: group: ${{ github.workflow }} - cancel-in-progress: true env: REGISTRY: ghcr.io @@ -107,20 +106,24 @@ jobs: - name: Get Release Asset uses: actions/github-script@v7 id: get_release_asset + env: + ARCH: ${{ matrix.arch }} + NETWORK: ${{ matrix.network }} with: + result-encoding: string script: | - const arch = context.matrix.arch, - network = context.matrix.network, - release = ['renterd', 'linux']; + const arch = process.env.ARCH, + network = process.env.NETWORK; - if (network === 'zen') - release.push('zen'); - - release.push(arch); - return release.join('-'); + switch (network) { + case 'mainnet': + return `renterd_linux_${arch}`; + default: + return `renterd_${network}_linux_${arch}`; + } - uses: actions/upload-artifact@v4 with: - name: ${{ steps.get_payload.outputs.result }} + name: ${{ steps.get_release_asset.outputs.result }} path: release/ build-mac: runs-on: macos-latest @@ -198,20 +201,24 @@ jobs: - name: Get Release Asset uses: actions/github-script@v7 id: get_release_asset + env: + ARCH: ${{ matrix.arch }} + NETWORK: ${{ matrix.network }} with: + result-encoding: string script: | - const arch = context.matrix.arch, - network = context.matrix.network, - release = ['renterd', 'darwin']; + const arch = process.env.ARCH, + network = process.env.NETWORK; - if (network === 'zen') - release.push('zen'); - - release.push(arch); - return release.join('-'); + switch (network) { + case 'mainnet': + return `renterd_darwin_${arch}`; + default: + return `renterd_${network}_darwin_${arch}`; + } - uses: actions/upload-artifact@v4 with: - name: ${{ steps.get_payload.outputs.result }} + name: ${{ steps.get_release_asset.outputs.result }} path: release/ build-windows: runs-on: windows-latest @@ -254,20 +261,24 @@ jobs: - name: Get Release Asset uses: actions/github-script@v7 id: get_release_asset + env: + ARCH: ${{ matrix.arch }} + NETWORK: ${{ matrix.network }} with: + result-encoding: string script: | - const arch = context.matrix.arch, - network = context.matrix.network, - release = ['renterd', 'windows']; + const arch = process.env.ARCH, + network = process.env.NETWORK; - if (network === 'zen') - release.push('zen'); - - release.push(arch); - return release.join('-'); + switch (network) { + case 'mainnet': + return `renterd_windows_${arch}`; + default: + return `renterd_${network}_windows_${arch}`; + } - uses: actions/upload-artifact@v4 with: - name: ${{ steps.get_payload.outputs.result }} + name: ${{ steps.get_release_asset.outputs.result }} path: release/ combine-release-assets: @@ -277,7 +288,7 @@ jobs: - name: Merge Artifacts uses: actions/upload-artifact/merge@v4 with: - name: renterd-release-assets-combined + name: renterd dispatch-homebrew: # only runs on full releases if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')