Skip to content

Commit bddcfde

Browse files
committed
fix: pass DMG checksum via job output; publish linux tarball for Flathub
1 parent cf9ee4a commit bddcfde

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/tauri-build.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ jobs:
9292
id-token: write
9393
attestations: write
9494
artifact-metadata: write
95+
outputs:
96+
dmg_sha256: ${{ steps.dmg_sha.outputs.sha }}
9597
strategy:
9698
fail-fast: false
9799
matrix:
@@ -231,6 +233,18 @@ jobs:
231233
gh release upload "$TAG" "$path" --clobber
232234
done
233235
236+
- name: Compute DMG checksum
237+
id: dmg_sha
238+
if: ${{ matrix.name == 'macOS' }}
239+
shell: bash
240+
env:
241+
BUNDLE_PATH: ${{ matrix.bundle_path }}
242+
run: |
243+
DMG="$(find "$BUNDLE_PATH" -name "Sable-${VERSION}-macos-universal.dmg" -type f | head -1)"
244+
[ -n "$DMG" ] || { echo "DMG not found in $BUNDLE_PATH" >&2; exit 1; }
245+
SHA="$(sha256sum "$DMG" | awk '{print $1}')"
246+
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
247+
234248
android:
235249
name: Build Android
236250
needs: setup-release
@@ -656,6 +670,7 @@ jobs:
656670
for f in .goreleaser-dist/Sable-*.deb \
657671
.goreleaser-dist/Sable-*.rpm \
658672
.goreleaser-dist/Sable-*.pkg.tar.zst \
673+
.goreleaser-dist/Sable-*-linux-x86_64.tar.gz \
659674
src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage \
660675
src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage.sig; do
661676
[ -e "$f" ] || continue
@@ -789,14 +804,13 @@ jobs:
789804
with:
790805
persist-credentials: false
791806

792-
- name: Compute the DMG checksum
807+
- name: Resolve DMG checksum
793808
shell: bash
794809
env:
795-
GH_TOKEN: ${{ github.token }}
810+
DMG_SHA256: ${{ needs.build.outputs.dmg_sha256 }}
796811
run: |
797-
DMG="Sable-${VERSION}-macos-universal.dmg"
798-
gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern "$DMG" --dir dmg
799-
echo "SHA256=$(sha256sum "dmg/$DMG" | awk '{print $1}')" >> "$GITHUB_ENV"
812+
[ -n "${DMG_SHA256:-}" ] || { echo "DMG sha256 is empty" >&2; exit 1; }
813+
echo "SHA256=$DMG_SHA256" >> "$GITHUB_ENV"
800814
801815
- name: Push the cask to the tap
802816
shell: bash

packaging/flatpak/moe.sable.client.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ modules:
5656
- type: archive
5757
# The GoReleaser archive has no wrapper directory.
5858
strip-components: 0
59-
url: https://github.com/SableClient/Sable/releases/download/v1.20.0/Sable-1.20.0-linux-x86_64.tar.gz
59+
# Seed values rewritten by x-checker-data below on each release.
60+
url: https://github.com/SableClient/Sable/releases/download/v1.21.0/Sable-1.21.0-linux-x86_64.tar.gz
6061
sha256: '0000000000000000000000000000000000000000000000000000000000000000'
6162
only-arches: [x86_64]
6263
x-checker-data:

0 commit comments

Comments
 (0)