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
83 changes: 83 additions & 0 deletions .github/workflows/aur-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Publish to AUR

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "Version to publish (e.g. 0.2.5). Defaults to latest release."
required: false

jobs:
aur-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Determine version
id: version
run: |
if [[ -n "${{ inputs.version }}" ]]; then
VERSION="${{ inputs.version }}"
else
VERSION="${GITHUB_REF_NAME#v}"
fi
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Publishing version: ${VERSION}"

- name: Download release assets and compute checksums
id: checksums
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.version.outputs.version }}
run: |
tmpdir=$(mktemp -d)

gh release download "v${VERSION}" \
--pattern "linear-linux-${VERSION}-x86_64.AppImage" \
--dir "${tmpdir}" || true

gh release download "v${VERSION}" \
--pattern "linear-linux-${VERSION}-arm64.AppImage" \
--dir "${tmpdir}" || true

if [[ -f "${tmpdir}/linear-linux-${VERSION}-x86_64.AppImage" ]]; then
SHA_X86=$(sha256sum "${tmpdir}/linear-linux-${VERSION}-x86_64.AppImage" | cut -d' ' -f1)
else
SHA_X86="SKIP"
fi

if [[ -f "${tmpdir}/linear-linux-${VERSION}-arm64.AppImage" ]]; then
SHA_ARM=$(sha256sum "${tmpdir}/linear-linux-${VERSION}-arm64.AppImage" | cut -d' ' -f1)
else
SHA_ARM="SKIP"
fi

echo "sha_x86=${SHA_X86}" >> "$GITHUB_OUTPUT"
echo "sha_arm=${SHA_ARM}" >> "$GITHUB_OUTPUT"
rm -rf "${tmpdir}"

- name: Update PKGBUILD with new version and checksums
env:
VERSION: ${{ steps.version.outputs.version }}
SHA_X86: ${{ steps.checksums.outputs.sha_x86 }}
SHA_ARM: ${{ steps.checksums.outputs.sha_arm }}
run: |
cd aur
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
sed -i "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('${SHA_X86}')/" PKGBUILD
sed -i "s/^sha256sums_aarch64=.*/sha256sums_aarch64=('${SHA_ARM}')/" PKGBUILD

- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
with:
pkgname: linear-linux-bin
pkgbuild: aur/PKGBUILD
commit_username: ${{ github.repository_owner }}
commit_email: ${{ github.repository_owner }}@users.noreply.github.com
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update to ${{ steps.version.outputs.version }}"
force_push: true
27 changes: 27 additions & 0 deletions aur/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pkgbase = linear-linux-bin
pkgdesc = Unofficial Linux desktop client for Linear (linear.app)
pkgver = 0.2.5
pkgrel = 1
url = https://github.com/selimaj-dev/linear-linux
arch = x86_64
arch = aarch64
license = ISC
depends = gtk3
depends = nss
depends = alsa-lib
depends = libxtst
depends = libxss
depends = at-spi2-core
optdepends = libappindicator-gtk3: tray icon support
provides = linear-linux
conflicts = linear-linux
conflicts = linear-desktop-bin
conflicts = linear-desktop-git
options = !strip
options = !debug
source_x86_64 = linear-linux-0.2.5-x86_64.AppImage::https://github.com/selimaj-dev/linear-linux/releases/download/v0.2.5/linear-linux-0.2.5-x86_64.AppImage
sha256sums_x86_64 = SKIP
source_aarch64 = linear-linux-0.2.5-arm64.AppImage::https://github.com/selimaj-dev/linear-linux/releases/download/v0.2.5/linear-linux-0.2.5-arm64.AppImage
sha256sums_aarch64 = SKIP

pkgname = linear-linux-bin
84 changes: 84 additions & 0 deletions aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Maintainer: Radu Ursache <https://github.com/rursache>
pkgname=linear-linux-bin
pkgver=0.2.5
pkgrel=1
pkgdesc="Unofficial Linux desktop client for Linear (linear.app)"
arch=('x86_64' 'aarch64')
url="https://github.com/selimaj-dev/linear-linux"
license=('ISC')
depends=('gtk3' 'nss' 'alsa-lib' 'libxtst' 'libxss' 'at-spi2-core')
optdepends=('libappindicator-gtk3: tray icon support')
provides=('linear-linux')
conflicts=('linear-linux' 'linear-desktop-bin' 'linear-desktop-git')
options=('!strip' '!debug')

_appimage_x86_64="linear-linux-${pkgver}-x86_64.AppImage"
_appimage_aarch64="linear-linux-${pkgver}-arm64.AppImage"

source_x86_64=("${_appimage_x86_64}::${url}/releases/download/v${pkgver}/${_appimage_x86_64}")
source_aarch64=("${_appimage_aarch64}::${url}/releases/download/v${pkgver}/${_appimage_aarch64}")

# Updated after each release by CI — see .github/workflows/aur-publish.yml
sha256sums_x86_64=('SKIP')
sha256sums_aarch64=('SKIP')

prepare() {
local _appimage
if [[ "$CARCH" == "x86_64" ]]; then
_appimage="${_appimage_x86_64}"
else
_appimage="${_appimage_aarch64}"
fi

chmod +x "${srcdir}/${_appimage}"
"${srcdir}/${_appimage}" --appimage-extract

# Fix permissions
chmod -R a+rX "${srcdir}/squashfs-root"
}

package() {
# Install app files
install -d "${pkgdir}/opt/${pkgname}"
cp -a "${srcdir}/squashfs-root/." "${pkgdir}/opt/${pkgname}/"

# Symlink executable
install -d "${pkgdir}/usr/bin"
ln -s "/opt/${pkgname}/AppRun" "${pkgdir}/usr/bin/linear-linux"

# Desktop entry
install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/linear-linux.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=Linear
Comment=Unofficial Linux desktop client for Linear
Exec=linear-linux %U
Icon=linear-linux
Terminal=false
Categories=Office;ProjectManagement;
StartupWMClass=linear-linux
MimeType=x-scheme-handler/linear;
EOF

# Icons
for size in 16 32 48 64 128 256 512; do
if [[ -f "${srcdir}/squashfs-root/usr/share/icons/hicolor/${size}x${size}/apps/linear.png" ]]; then
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${size}x${size}/apps/linear.png" \
"${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linear-linux.png"
fi
done

# Fallback: use the bundled icon from assets
if [[ -f "${srcdir}/squashfs-root/resources/assets/linear-app-icon.png" ]]; then
install -Dm644 "${srcdir}/squashfs-root/resources/assets/linear-app-icon.png" \
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/linear-linux.png"
fi

# License
if [[ -f "${srcdir}/squashfs-root/LICENSE" ]]; then
install -Dm644 "${srcdir}/squashfs-root/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
fi

# Fix permissions on chrome-sandbox
chmod 4755 "${pkgdir}/opt/${pkgname}/chrome-sandbox" 2>/dev/null || true
}