Skip to content

Commit 5addcef

Browse files
committed
chore(actions): release body
1 parent 93918c4 commit 5addcef

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

.github/workflows/release.yml

+30-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- name: Get version
1818
id: get_version
19-
run: echo "VERSION=$(node -p "require('./src-tauri/tauri.conf.json').version")" >> $GITHUB_OUTPUT
19+
run: echo "VERSION=$(node -p \"require('./src-tauri/tauri.conf.json').version\")" >> $GITHUB_OUTPUT
2020

2121
build-macos:
2222
permissions: write-all
@@ -85,14 +85,12 @@ jobs:
8585
- name: Rename macOS Artifacts
8686
run: |
8787
mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/*.dmg src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.dmg
88-
mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.app.tar.gz
8988
- name: Upload artifacts
9089
uses: actions/upload-artifact@v4
9190
with:
9291
name: macos-${{ matrix.arch }}-binaries
9392
path: |
9493
src-tauri/target/**/release/bundle/dmg/*.dmg
95-
src-tauri/target/**/release/bundle/macos/*.app.tar.gz
9694
9795
build-windows:
9896
permissions: write-all
@@ -235,13 +233,35 @@ jobs:
235233
uses: actions/download-artifact@v4
236234
with:
237235
path: artifacts
238-
- name: Generate Changelog
239-
id: changelog
236+
- name: Generate Release Body
237+
id: release_body
240238
run: |
241-
CHANGELOG=$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s")
242-
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
243-
echo "$CHANGELOG" >> $GITHUB_ENV
244-
echo "EOF" >> $GITHUB_ENV
239+
VERSION=${{ needs.prepare.outputs.version }}
240+
CHANGES=$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s")
241+
242+
# Calculate SHA256 hashes for each artifact
243+
WINDOWS_HASH=$(sha256sum artifacts/windows-x64-binaries/Qopy-$VERSION_x64.msi | awk '{ print $1 }')
244+
MAC_SILICON_HASH=$(sha256sum artifacts/macos-silicon-binaries/Qopy-$VERSION_silicon.dmg | awk '{ print $1 }')
245+
MAC_INTEL_HASH=$(sha256sum artifacts/macos-intel-binaries/Qopy-$VERSION_intel.dmg | awk '{ print $1 }')
246+
DEBIAN_HASH=$(sha256sum artifacts/linux-binaries/Qopy-$VERSION_amd64.deb | awk '{ print $1 }')
247+
APPIMAGE_HASH=$(sha256sum artifacts/linux-binaries/Qopy-$VERSION_amd64.AppImage | awk '{ print $1 }')
248+
REDHAT_HASH=$(sha256sum artifacts/linux-binaries/Qopy-$VERSION_amd64.rpm | awk '{ print $1 }')
249+
250+
## ♻️ Changelog
251+
252+
$CHANGES
253+
254+
⬇️ Downloads
255+
256+
- [Windows (x64)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_x64.msi) - $WINDOWS_HASH
257+
- [Windows (ARM64)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_arm64.msi) - $WINDOWS_HASH
258+
- [macOS (Silicon)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_silicon.dmg) - $MAC_SILICON_HASH
259+
- [macOS (Intel)](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_intel.dmg) - $MAC_INTEL_HASH
260+
- [Debian](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_amd64.deb) - $DEBIAN_HASH
261+
- [AppImage](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_amd64.AppImage) - $APPIMAGE_HASH
262+
- [Red Hat](https://github.com/${{ github.repository }}/releases/download/v${{ needs.prepare.outputs.version }}/Qopy-${{ needs.prepare.outputs.version }}_amd64.rpm) - $REDHAT_HASH"
263+
264+
echo "RELEASE_BODY=$RELEASE_BODY" >> $GITHUB_ENV
245265
- name: Create Release
246266
uses: softprops/action-gh-release@v1
247267
env:
@@ -252,13 +272,8 @@ jobs:
252272
name: v${{ needs.prepare.outputs.version }}
253273
files: |
254274
artifacts/**/*.dmg
255-
artifacts/**/*.app.tar.gz
256275
artifacts/**/*.msi
257276
artifacts/**/*.deb
258277
artifacts/**/*.AppImage
259278
artifacts/**/*.rpm
260-
body: |
261-
## Changelog
262-
${{ env.CHANGELOG }}
263-
264-
See the assets to download this version and install.
279+
body: ${{ env.RELEASE_BODY }}

0 commit comments

Comments
 (0)