Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
309 changes: 238 additions & 71 deletions .github/workflows/tauri-build.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
experiment
dist
.goreleaser-dist
coverage
node_modules
devAssets
Expand Down
204 changes: 204 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# Linux packaging for the CEF build. Tauri builds the macOS/Windows bundles;
# GoReleaser OSS can't import pre-built artifacts (`builder: prebuilt` is Pro).
#
# Secrets: AUR_KEY, SNAPCRAFT_STORE_CREDENTIALS

version: 2

project_name: sable

# Vite owns ./dist.
dist: .goreleaser-dist

before:
hooks:
- pnpm install --frozen-lockfile
# cargo skips tauri.conf.json's beforeBuildCommand.
- pnpm build

builds:
- id: sable
builder: rust
dir: src-tauri
tool: cargo
command: build
targets: [x86_64-unknown-linux-gnu]
flags:
- --release
- --no-default-features
- --features
- cef,updater
hooks:
post: bash scripts/cef/stage.sh

archives:
- id: sable
formats: [tar.gz]
name_template: 'Sable-{{ .Version }}-linux-x86_64'
files:
- LICENSE
- src: src-tauri/target/cef-stage/runtime
dst: .
- src: src-tauri/target/cef-stage/share
dst: .

nfpms:
- package_name: sable
file_name_template: 'Sable-{{ .Version }}-linux-x86_64'
homepage: https://sable.moe
maintainer: Sable Maintainers <https://github.com/SableClient/Sable>
description: Sable, a Matrix client
license: AGPL-3.0-or-later
section: net
formats: [deb, rpm, archlinux]
# Beside the CEF runtime, for build.rs's rpath=$ORIGIN.
bindir: /opt/sable
provides: [sable]
contents:
- src: src-tauri/target/cef-stage/runtime/
dst: /opt/sable
type: tree
- src: src-tauri/target/cef-stage/share/
dst: /usr/share
type: tree
- src: /opt/sable/sable
dst: /usr/bin/sable
type: symlink
scripts:
postinstall: packaging/linux/postinstall.sh
postremove: packaging/linux/postinstall.sh
overrides:
deb:
dependencies:
- libgtk-3-0
- libnss3
- libnspr4
- libgbm1
- libdrm2
- libxkbcommon0
- libxss1
- libasound2
- libcups2
- xdg-utils
- libayatana-appindicator3-1
rpm:
dependencies:
- gtk3
- nss
- nspr
- mesa-libgbm
- libdrm
- libxkbcommon
- libXScrnSaver
- alsa-lib
- cups-libs
- xdg-utils
- libayatana-appindicator3.so.1()(64bit)
archlinux:
dependencies:
- gtk3
- nss
- alsa-lib
- libcups
- libdrm
- mesa
- libxkbcommon
- libxss
- at-spi2-core
- dbus
- xdg-utils
- libayatana-appindicator
- hicolor-icon-theme
- desktop-file-utils

aurs:
- name: sable-bin
homepage: https://sable.moe
description: Sable, a Matrix client
maintainers:
- Sable Maintainers <https://github.com/SableClient/Sable>
license: AGPL-3.0-or-later
private_key: '{{ .Env.AUR_KEY }}'
git_url: ssh://aur@aur.archlinux.org/sable-bin.git
provides: [sable]
conflicts: [sable, sable-nightly-bin]
depends:
- gtk3
- nss
- alsa-lib
- libcups
- libdrm
- mesa
- libxkbcommon
- libxss
- at-spi2-core
- dbus
- xdg-utils
- libayatana-appindicator
- hicolor-icon-theme
- desktop-file-utils
package: |-
install -Dm755 sable "${pkgdir}/opt/sable/sable"
cp -a runtime/. "${pkgdir}/opt/sable/"
install -dm755 "${pkgdir}/usr/share" "${pkgdir}/usr/bin"
cp -a share/. "${pkgdir}/usr/share/"
ln -s /opt/sable/sable "${pkgdir}/usr/bin/sable"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
commit_author:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com

snapcrafts:
- name: sable
title: Sable
summary: Sable, a Matrix client
description: |
Sable is a cross-platform Matrix client built with Tauri, offering a
native desktop experience with end-to-end encryption support.
icon: src-tauri/icons/128x128@2x.png
license: AGPL-3.0-or-later
grade: stable
confinement: strict
base: core22
publish: true
extra_files:
# Binaries land at the prime root.
- source: src-tauri/target/cef-stage/runtime
destination: .
- source: src-tauri/target/cef-stage/share/applications/sable.desktop
destination: meta/gui/sable.desktop
- source: src-tauri/icons/128x128@2x.png
destination: meta/gui/icon.png
apps:
sable:
command: sable
desktop: meta/gui/sable.desktop
extensions: [gnome]
plugs:
- network
- network-bind
- home
- removable-media
- browser-support
- audio-playback
- audio-record
- camera
- password-manager-service

checksum:
name_template: 'Sable-{{ .Version }}-linux-checksums.txt'
algorithm: sha256

# Nightlies run `release --snapshot`; GoReleaser's `nightly` pipe is Pro-only.
snapshot:
version_template: '{{ .Env.VERSION }}'

release:
github:
owner: SableClient
name: Sable
# Knope writes the release notes.
mode: keep-existing
draft: false
prerelease: auto
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ The stable web app is available at [app.sable.moe](https://app.sable.moe/) and t

You can also download our desktop app for Windows and Linux from [releases](https://github.com/SableClient/Sable/releases/latest). Release artifacts include build attestations, and desktop installations update automatically.

### Desktop (Linux / macOS / Windows)

<a href="https://github.com/SableClient/Sable/releases/latest"><img alt="Download" src="https://img.shields.io/badge/Download-181717?style=for-the-badge&logo=github"></a>
&nbsp;
<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>
&nbsp;
<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>

### Android

<a href="https://github.com/SableClient/Sable/releases/latest"><img alt="Download APK" src="https://img.shields.io/badge/Download_APK-3DDC84?style=for-the-badge&logo=android"></a>
&nbsp;
<a href="https://github.com/SableClient/Sable/releases/latest/download/obtainium.json"><img alt="Add to Obtainium" src="https://img.shields.io/badge/Add_to_Obtainium-6750A3?style=for-the-badge"></a>

## iOS (AltStore / SideStore)

Sable iOS builds are distributed as unsigned IPAs through [AltStore](https://altstore.io) and [SideStore](https://sidestore.io). Each release publishes both the IPA and an `altstore-source.json` manifest — stable builds to the [latest GitHub release](https://github.com/SableClient/Sable/releases/latest), nightly builds to the [`nightly` GitHub release](https://github.com/SableClient/Sable/releases/tag/nightly).
Expand Down
2 changes: 1 addition & 1 deletion mise.tauri.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tauri-specific dev tools and system dependencies.
# Loaded via `MISE_ENV=tauri` (set by `mise run setup:tauri` or CI).
# Loaded via `MISE_ENV=tauri` (set by the `tauri:setup` task's env, or CI).

[env]
ANDROID_NDK_VERSION = "29.0.14206865"
Expand Down
3 changes: 1 addition & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tools = { "cargo:knope" = "0.23.0", cargo-binstall = "1.20.1" }

[tasks."knope:document-change"]
description = "Document a change with knope"
alias = ["doc", "doc"]
alias = ["doc", "dc"]
run = { task = "knope", args = ["document-change"] }

[tasks."tauri:setup"]
Expand Down Expand Up @@ -93,7 +93,6 @@ run = [
"winget install --id Microsoft.EdgeWebView2Runtime --source winget",
]


[tasks."cargo:lint"]
description = "Check Rust formatting and Clippy lints"
alias = ["cl", "cargo-lint"]
Expand Down
50 changes: 0 additions & 50 deletions nfpm.yaml

This file was deleted.

45 changes: 45 additions & 0 deletions packaging/aur/sable-nightly-bin.PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Maintainer: Sable Maintainers <https://github.com/SableClient/Sable>

pkgname=sable-nightly-bin
# pkgver mirrors the release version with '-' replaced by '.', so each nightly
# sorts above the last. _relver keeps the original form for the asset URL.
pkgver=1.20.1.nightly.2607242130
pkgrel=1
_relver=1.20.1-nightly.2607242130
pkgdesc="An almost stable Matrix client (nightly builds)"
arch=('x86_64')
url="https://github.com/SableClient/Sable"
license=('AGPL-3.0-or-later')
# The bundled CEF runtime needs Chromium's system libraries, not webkit2gtk.
depends=(
'gtk3'
'nss'
'alsa-lib'
'libcups'
'libdrm'
'mesa'
'libxkbcommon'
'libxss'
'libxcomposite'
'libxdamage'
'libxrandr'
'at-spi2-core'
'dbus'
'libayatana-appindicator'
'hicolor-icon-theme'
'desktop-file-utils'
'xdg-utils'
)
provides=('sable')
conflicts=('sable' 'sable-bin')
options=('!strip' '!debug')
install=${pkgname}.install
source_x86_64=("${pkgname}-${pkgver}.deb::${url}/releases/download/nightly/Sable-${_relver}-linux-x86_64.deb")
sha256sums_x86_64=('0000000000000000000000000000000000000000000000000000000000000000')

package() {
# bsdtar reads whichever compression nfpm used for data.tar.*
bsdtar -O -xf "${srcdir}/${pkgname}-${pkgver}.deb" 'data.tar*' \
| bsdtar -xp -C "${pkgdir}"
find "${pkgdir}" -type d -exec chmod 755 {} +
}
12 changes: 12 additions & 0 deletions packaging/aur/sable-nightly-bin.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
post_install() {
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
update-desktop-database -q
}

post_upgrade() {
post_install
}

post_remove() {
post_install
}
9 changes: 9 additions & 0 deletions packaging/linux/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
fi
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database -q || true
fi
Loading
Loading