mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-24 11:01:17 -08:00
feat: add Flathub manifest and Homebrew cask distribution
This commit is contained in:
7 files changed
+260
No files matched your search
@@ -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
|
||||
@@ -20,6 +20,16 @@ You can also download our desktop app for Windows and Linux from [releases](http
|
||||
<a href="https://aur.archlinux.org/packages/sable-bin"><img alt="AUR" src="https://img.shields.io/badge/Install_via_AUR-1793D1?style=for-the-badge&logo=arch-linux"></a>
|
||||
|
||||
<a href="https://snapcraft.io/sable"><img alt="Snap Store" src="https://img.shields.io/badge/Install_via_Snap-82BEA0?style=for-the-badge&logo=snapcraft"></a>
|
||||
|
||||
<a href="https://flathub.org/apps/moe.sable.client"><img alt="Flathub" src="https://img.shields.io/badge/Install_via_Flathub-4A86CF?style=for-the-badge&logo=flathub"></a>
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- The ID matches tauri.conf.json's `identifier`. tauri-plugin-single-instance
|
||||
owns <identifier>.SingleInstance on D-Bus, and Flatpak only permits owning
|
||||
names under the app ID, so the two have to agree or the app cannot start. -->
|
||||
<component type="desktop-application">
|
||||
<id>moe.sable.client</id>
|
||||
|
||||
<name>Sable</name>
|
||||
<summary>Chat over the Matrix network</summary>
|
||||
|
||||
<developer id="moe.sable">
|
||||
<name>Sable Maintainers</name>
|
||||
</developer>
|
||||
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>AGPL-3.0-only</project_license>
|
||||
|
||||
<url type="homepage">https://sable.moe</url>
|
||||
<url type="bugtracker">https://github.com/SableClient/Sable/issues</url>
|
||||
<url type="vcs-browser">https://github.com/SableClient/Sable</url>
|
||||
|
||||
<content_rating type="oars-1.1">
|
||||
<content_attribute id="social-chat">intense</content_attribute>
|
||||
<content_attribute id="social-audio">intense</content_attribute>
|
||||
</content_rating>
|
||||
|
||||
<supports>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>touch</control>
|
||||
</supports>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
Sable is a Matrix client for desktop, with end-to-end encrypted
|
||||
messaging, spaces, threads, and voice and video calls.
|
||||
</p>
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>End-to-end encryption with cross-signing and key backup</li>
|
||||
<li>Spaces, threads, and replies</li>
|
||||
<li>Voice and video calls</li>
|
||||
<li>Custom themes</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">moe.sable.client.desktop</launchable>
|
||||
|
||||
<!-- Flathub requires at least one reachable screenshot. Commit real captures
|
||||
under docs/screenshots/ and update these URLs before submitting. -->
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/SableClient/Sable/main/docs/screenshots/timeline.png</image>
|
||||
<caption>A room timeline</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="1.20.0" date="2026-07-17">
|
||||
<url type="details">https://github.com/SableClient/Sable/releases/tag/v1.20.0</url>
|
||||
</release>
|
||||
</releases>
|
||||
</component>
|
||||
@@ -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
|
||||
Executable
+3
@@ -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 "$@"
|
||||
@@ -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
|
||||
Reference in new issue
Block a user