Skip to content

Commit

Permalink
chore(actions): fix command not found
Browse files Browse the repository at this point in the history
  • Loading branch information
0PandaDEV committed Nov 25, 2024
1 parent fcc310b commit 9162033
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Generate Release Body
id: release_body
run: |
VERSION=${{ needs.prepare.outputs.version }}
CHANGES=$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s")
# Calculate SHA256 hashes for each artifact
WINDOWS_ARM_HASH=$(sha256sum artifacts/windows-arm64-binaries/Qopy-$VERSION_arm64.msi | awk '{ print $1 }')
WINDOWS_64_HASH=$(sha256sum artifacts/windows-x64-binaries/Qopy-$VERSION_x64.msi | awk '{ print $1 }')
Expand All @@ -249,22 +253,26 @@ jobs:
DEBIAN_HASH=$(sha256sum artifacts/linux-binaries/Qopy-$VERSION_amd64.deb | awk '{ print $1 }')
APPIMAGE_HASH=$(sha256sum artifacts/linux-binaries/Qopy-$VERSION_amd64.AppImage | awk '{ print $1 }')
REDHAT_HASH=$(sha256sum artifacts/linux-binaries/Qopy-$VERSION_amd64.rpm | awk '{ print $1 }')
RELEASE_BODY=$(cat <<EOF
## ♻️ Changelog
$CHANGES
⬇️ Downloads
- [Windows (x64)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_x64.msi) - $WINDOWS_64_HASH
- [Windows (ARM64)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_arm64.msi) - $WINDOWS_ARM_HASH
- [macOS (Silicon)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_silicon.dmg) - $MAC_SILICON_HASH
- [macOS (Intel)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_intel.dmg) - $MAC_INTEL_HASH
- [Debian](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_amd64.deb) - $DEBIAN_HASH
- [AppImage](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_amd64.AppImage) - $APPIMAGE_HASH
- [Red Hat](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_amd64.rpm) - $REDHAT_HASH"
- [Windows (x64)](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_x64.msi) - $WINDOWS_64_HASH
- [Windows (ARM64)](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_arm64.msi) - $WINDOWS_ARM_HASH
- [macOS (Silicon)](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_silicon.dmg) - $MAC_SILICON_HASH
- [macOS (Intel)](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_intel.dmg) - $MAC_INTEL_HASH
- [Debian](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_amd64.deb) - $DEBIAN_HASH
- [AppImage](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_amd64.AppImage) - $APPIMAGE_HASH
- [Red Hat](https://github.com/${{ github.repository }}/releases/download/v$VERSION/Qopy-$VERSION_amd64.rpm) - $REDHAT_HASH
EOF
)
echo "RELEASE_BODY=$RELEASE_BODY" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v2
env:
Expand Down

0 comments on commit 9162033

Please sign in to comment.