Skip to content

Commit

Permalink
chore: Fix up release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Bergius <[email protected]>
  • Loading branch information
joonas authored and thomastaylor312 committed Sep 21, 2024
1 parent efe9a8a commit 1136744
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,26 @@ jobs:
env:
RELEASE_VERSION: ${{ needs.build.outputs.version_output }}
steps:
- name: download release assets
- name: Download release assets
uses: actions/download-artifact@v4
- name: Generate Checksums

- name: Prepare release
run: |
for dir in */; do
cd "$dir" || continue
sum=$(sha256sum * | awk '{ print $1 }')
echo "$dir:$sum" >> checksums-${{ env.RELEASE_VERSION }}.txt
cd ..
test -d "$dir" || continue
tarball="${dir%/}.tar.gz"
tar -czvf "${tarball}" "$dir"
sha256sum "${tarball}" >> SHA256SUMS
done
- name: Package Binaries
run: for dir in */; do tar -czvf "${dir%/}.tar.gz" "$dir"; done
- name: Create github release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
draft: false
files: |
checksums-${{ env.RELEASE_VERSION }}.txt
SHA256SUMS
wadm-${{ env.RELEASE_VERSION }}-linux-aarch64.tar.gz
wadm-${{ env.RELEASE_VERSION }}-linux-amd64.tar.gz
wadm-${{ env.RELEASE_VERSION }}-macos-aarch64.tar.gz
Expand Down Expand Up @@ -189,10 +189,18 @@ jobs:
- uses: actions/download-artifact@v4
with:
path: ./artifacts
merge-multiple: true
- run: |
chmod +x ./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-aarch64
chmod +x ./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
pattern: '*linux*'

- name: Prepare container artifacts
working-directory: ./artifacts
run: |
for dir in */; do
name="${dir%/}"
mv "${name}/wadm" wadm
chmod +x wadm
rmdir "${name}"
mv wadm "${name}"
done
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down

0 comments on commit 1136744

Please sign in to comment.