Skip to content

Commit

Permalink
Update publish (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl authored May 17, 2024
2 parents 340b498 + 09f3734 commit e1be40a
Showing 1 changed file with 40 additions and 29 deletions.
69 changes: 40 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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, '-')
Expand Down

0 comments on commit e1be40a

Please sign in to comment.