Skip to content
Merged
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
72 changes: 72 additions & 0 deletions .github/workflows/tauri-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,78 @@ jobs:
git commit -m "nightly ${VERSION}"
git push

distribute-aur:
name: Publish stable to AUR
needs: [setup-release, linux]
runs-on: ubuntu-latest
timeout-minutes: 10
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: Download .deb artifact and compute checksum
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sable-linux-deb-x86_64
path: deb-artifact

- name: Compute checksum
shell: bash
run: |
set -- deb-artifact/Sable-*-linux-x86_64.deb
[ "$#" -eq 1 ] && [ -e "$1" ] || { echo "Expected exactly one .deb, got $*" >&2; exit 1; }
echo "SHA256=$(sha256sum "$1" | awk '{print $1}')" >> "$GITHUB_ENV"

- name: Push to AUR sable-bin
shell: bash
env:
AUR_KEY: ${{ secrets.AUR_KEY }}
run: |
if [ -z "${AUR_KEY:-}" ]; then
echo "::notice::AUR_KEY is not set; skipping the AUR publish."
exit 0
fi
mkdir -p ~/.ssh
printf '%s\n' "$AUR_KEY" > ~/.ssh/aur_key
chmod 600 ~/.ssh/aur_key
ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts
export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/aur_key -o IdentitiesOnly=yes"

git clone "ssh://aur@aur.archlinux.org/sable-bin.git" aur-repo
cp packaging/aur/sable-bin.PKGBUILD aur-repo/PKGBUILD
cp packaging/aur/sable-bin.install aur-repo/sable-bin.install

cd aur-repo
sed -i \
-e "s/^pkgver=.*/pkgver=${VERSION}/" \
-e "s/^pkgrel=.*/pkgrel=1/" \
-e "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('${SHA256}')/" \
PKGBUILD

docker run --rm -v "$PWD:/src:ro" archlinux:base-devel bash -c '
useradd -m build
cp /src/PKGBUILD /home/build/
cp /src/sable-bin.install /home/build/
su build -c "cd /home/build && makepkg --printsrcinfo"
' > .SRCINFO

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add PKGBUILD sable-bin.install .SRCINFO
if git diff --cached --quiet; then
echo "Nothing changed; skipping the push."
exit 0
fi
git commit -m "sable ${VERSION}"
git push

build-nightly-flatpak:
name: Build nightly Flatpak ${{ matrix.arch }}
needs: [setup-release, linux]
Expand Down
40 changes: 40 additions & 0 deletions packaging/aur/sable-bin.PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Maintainer: Sable Maintainers <https://github.com/SableClient/Sable>

pkgname=sable-bin
pkgver=1.21.0
pkgrel=1
pkgdesc="An almost stable Matrix client"
arch=('x86_64')
url="https://github.com/SableClient/Sable"
license=('AGPL-3.0-or-later')
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-nightly-bin')
options=('!strip' '!debug')
install=${pkgname}.install
source_x86_64=("${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/Sable-${pkgver}-linux-x86_64.deb")
sha256sums_x86_64=('0000000000000000000000000000000000000000000000000000000000000000')

package() {
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-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
}
Loading