diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml index 6380ff6eb..e9e291f81 100644 --- a/.github/workflows/tauri-build.yml +++ b/.github/workflows/tauri-build.yml @@ -867,3 +867,62 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: gh release upload "$TAG" obtainium.json --clobber + + distribute-homebrew: + name: Publish Homebrew cask + # GoReleaser's homebrew_casks pipe would build the cask from our Linux + # archive, since it is the only one it produces. Tauri owns the .dmg and + # importing it needs the Pro-only `prebuilt` builder. + needs: [setup-release, build] + runs-on: ubuntu-latest + timeout-minutes: 10 + # Casks track stable releases. + if: ${{ needs.setup-release.outputs.nightly != 'true' }} + permissions: + contents: read + env: + TAG: ${{ needs.setup-release.outputs.tag }} + VERSION: ${{ needs.setup-release.outputs.version }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Compute the DMG checksum + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + DMG="Sable-${VERSION}-macos-universal.dmg" + gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern "$DMG" --dir dmg + echo "SHA256=$(sha256sum "dmg/$DMG" | awk '{print $1}')" >> "$GITHUB_ENV" + + - name: Push the cask to the tap + shell: bash + env: + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} + run: | + if [ -z "${HOMEBREW_TAP_TOKEN:-}" ]; then + echo "::notice::HOMEBREW_TAP_TOKEN is not set; skipping the Homebrew publish." + exit 0 + fi + git clone --depth 1 \ + "https://x-access-token:${HOMEBREW_TAP_TOKEN}@github.com/SableClient/homebrew-sable.git" tap + + mkdir -p tap/Casks + sed \ + -e "s/^ version .*/ version \"${VERSION}\"/" \ + -e "s/^ sha256 .*/ sha256 \"${SHA256}\"/" \ + packaging/homebrew/sable.rb > tap/Casks/sable.rb + + cd tap + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add Casks/sable.rb + if git diff --cached --quiet; then + echo "Nothing changed; skipping the push." + exit 0 + fi + git commit -m "sable ${VERSION}" + # The tap may still be an empty repository on the first run. + git push origin HEAD:refs/heads/main diff --git a/README.md b/README.md index 7d9fec759..629d4c209 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,16 @@ You can also download our desktop app for Windows and Linux from [releases](http AUR   Snap Store +  +Flathub + +On macOS, via our [Homebrew tap](https://github.com/SableClient/homebrew-sable): + +```sh +brew install --cask SableClient/sable/sable +``` + +The fully qualified name matters: since [Homebrew 6.0.0](https://brew.sh/2026/06/11/homebrew-6.0.0/) non-official taps need explicit trust, and installing this way trusts just this one cask. `brew tap` followed by a short-name install now fails unless you also run `brew trust`. ## Android (Obtainium) diff --git a/packaging/flatpak/moe.sable.client.desktop b/packaging/flatpak/moe.sable.client.desktop new file mode 100644 index 000000000..005db1026 --- /dev/null +++ b/packaging/flatpak/moe.sable.client.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=Sable +Comment=Chat over the Matrix network +Exec=sable %U +Icon=moe.sable.client +Terminal=false +Categories=Network;InstantMessaging;Chat; +StartupWMClass=sable +MimeType=x-scheme-handler/sable;x-scheme-handler/moe.sable.app; diff --git a/packaging/flatpak/moe.sable.client.metainfo.xml b/packaging/flatpak/moe.sable.client.metainfo.xml new file mode 100644 index 000000000..cde96119a --- /dev/null +++ b/packaging/flatpak/moe.sable.client.metainfo.xml @@ -0,0 +1,63 @@ + + + + moe.sable.client + + Sable + Chat over the Matrix network + + + Sable Maintainers + + + CC0-1.0 + AGPL-3.0-only + + https://sable.moe + https://github.com/SableClient/Sable/issues + https://github.com/SableClient/Sable + + + intense + intense + + + + pointing + keyboard + touch + + + +

+ Sable is a Matrix client for desktop, with end-to-end encrypted + messaging, spaces, threads, and voice and video calls. +

+

Features:

+ +
+ + moe.sable.client.desktop + + + + + https://raw.githubusercontent.com/SableClient/Sable/main/docs/screenshots/timeline.png + A room timeline + + + + + + https://github.com/SableClient/Sable/releases/tag/v1.20.0 + + +
diff --git a/packaging/flatpak/moe.sable.client.yml b/packaging/flatpak/moe.sable.client.yml new file mode 100644 index 000000000..5aa20bea1 --- /dev/null +++ b/packaging/flatpak/moe.sable.client.yml @@ -0,0 +1,74 @@ +# Flathub manifest. Submit this to https://github.com/flathub/flathub by opening +# a PR against the `new-pr` branch; Flathub builds it on their own infra. +# +# It consumes the release tarball GoReleaser publishes rather than building from +# source: Flathub builds have no network, and a source build would need Cargo and +# pnpm vendored plus the ~1GB CEF distribution declared as a source. +app-id: moe.sable.client + +runtime: org.freedesktop.Platform +runtime-version: '25.08' +sdk: org.freedesktop.Sdk + +# Supplies zypak, which makes Chromium's sandbox work inside Flatpak. Sable's +# Linux build embeds CEF and ships no setuid chrome-sandbox. +base: org.electronjs.Electron2.BaseApp +base-version: '25.08' + +command: sable + +finish-args: + - --socket=wayland + - --socket=fallback-x11 + - --share=ipc + - --device=dri + - --share=network + # Voice and video calls. + - --socket=pulseaudio + # Camera. Flathub review may ask to narrow this once CEF can use the portal. + - --device=all + # Keyring, where the E2EE session store keeps its secret. + - --talk-name=org.freedesktop.secrets + - --talk-name=org.freedesktop.Notifications + # Tray icon. + - --talk-name=org.kde.StatusNotifierWatcher + # Saving and attaching files. + - --filesystem=xdg-download + - --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons + +modules: + - name: sable + buildsystem: simple + build-commands: + - mkdir -p ${FLATPAK_DEST}/sable + # build.rs sets rpath=$ORIGIN, so libcef.so and the CEF resources have to + # stay beside the binary rather than going into /app/lib. + - find . -mindepth 1 -maxdepth 1 -not -name applications -not -name icons + -not -name 'moe.sable.client.*' -not -name sable.sh -exec cp -r {} ${FLATPAK_DEST}/sable/ + \; + - chmod +x ${FLATPAK_DEST}/sable/sable + - install -Dm755 sable.sh ${FLATPAK_DEST}/bin/sable + - install -Dm644 moe.sable.client.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml + - install -Dm644 moe.sable.client.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop + - for s in 32x32 64x64 128x128 256x256; do install -Dm644 "icons/hicolor/$s/apps/sable.png" + "${FLATPAK_DEST}/share/icons/hicolor/$s/apps/${FLATPAK_ID}.png"; done + sources: + - type: archive + # The GoReleaser archive has no wrapper directory. + strip-components: 0 + url: https://github.com/SableClient/Sable/releases/download/v1.20.0/Sable-1.20.0-linux-x86_64.tar.gz + sha256: '0000000000000000000000000000000000000000000000000000000000000000' + only-arches: [x86_64] + x-checker-data: + type: json + url: https://api.github.com/repos/SableClient/Sable/releases/latest + version-query: .tag_name | sub("^v"; "") + url-query: .assets[] | select(.name == "Sable-" + $version + "-linux-x86_64.tar.gz") + | .browser_download_url + is-main-source: true + - type: file + path: sable.sh + - type: file + path: moe.sable.client.desktop + - type: file + path: moe.sable.client.metainfo.xml diff --git a/packaging/flatpak/sable.sh b/packaging/flatpak/sable.sh new file mode 100755 index 000000000..6699c6b91 --- /dev/null +++ b/packaging/flatpak/sable.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# zypak lets CEF's sandbox work under Flatpak without a setuid chrome-sandbox. +exec zypak-wrapper /app/sable/sable "$@" diff --git a/packaging/homebrew/sable.rb b/packaging/homebrew/sable.rb new file mode 100644 index 000000000..1c2eb347b --- /dev/null +++ b/packaging/homebrew/sable.rb @@ -0,0 +1,41 @@ +# Generated from packaging/homebrew/sable.rb in SableClient/Sable. Edit it there. +cask "sable" do + version "1.20.0" + sha256 "0000000000000000000000000000000000000000000000000000000000000000" + + url "https://github.com/SableClient/Sable/releases/download/v#{version}/Sable-#{version}-macos-universal.dmg", + verified: "github.com/SableClient/Sable/" + name "Sable" + desc "Client for the Matrix chat network" + homepage "https://sable.moe/" + + livecheck do + url :url + strategy :github_latest + end + + # The app updates itself through tauri-plugin-updater. + auto_updates true + # Tauri's default floor; bundle.macOS.minimumSystemVersion is unset. + depends_on macos: :high_sierra + + app "Sable.app" + + # The DMG is neither signed nor notarized, so Gatekeeper would refuse to open + # it. Drop the quarantine flag the download picked up. + postflight do + system_command "/usr/bin/xattr", + args: ["-dr", "com.apple.quarantine", "#{appdir}/Sable.app"] + end + + uninstall quit: "moe.sable.client" + + zap trash: [ + "~/Library/Application Support/moe.sable.client", + "~/Library/Caches/moe.sable.client", + "~/Library/HTTPStorages/moe.sable.client", + "~/Library/Preferences/moe.sable.client.plist", + "~/Library/Saved Application State/moe.sable.client.savedState", + "~/Library/WebKit/moe.sable.client", + ] +end