feat(packaging): add AUR release package and CI publish (#518)

* feat(packaging): add AUR release package and CI publish

Ship packaging/aur/vocalinux for yay installs of tagged releases, wire
AUR publish into the release workflow (skipped until secrets are set),
and document one-time maintainer setup.

Fixes #116

* refactor(packaging): slim AUR PR to PKGBUILD + CI

Drop systemd unit, install script, website edits, and long docs.
Keep release PKGBUILD, minimal publish job, and short AUR setup notes.
This commit is contained in:
Jatin K Malik
2026-07-14 23:41:31 -07:00
committed by GitHub
parent 0a7acaea2f
commit 6545e4ea66
5 changed files with 163 additions and 0 deletions
+48
View File
@@ -98,6 +98,11 @@ jobs:
desktop integration, and model setup, use the Quick Install command above.
See docs/INSTALL.md for distro-specific PyPI prerequisites.
### Arch Linux (AUR)
```bash
yay -S vocalinux
```
---
See [CHANGELOG](https://github.com/jatinkrmalik/vocalinux/releases) for detailed changes.
@@ -140,6 +145,49 @@ jobs:
run: |
twine upload dist/* --skip-existing
publish-aur:
name: Publish to AUR
needs: build-and-release
runs-on: ubuntu-latest
# Secrets: AUR_SSH_PRIVATE_KEY, AUR_USERNAME, AUR_EMAIL — see docs/AUR.md
steps:
- name: Check for AUR credentials
id: aur
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
if [ -z "$AUR_SSH_PRIVATE_KEY" ]; then
echo "configured=false" >> "$GITHUB_OUTPUT"
echo "AUR_SSH_PRIVATE_KEY not set; skipping (docs/AUR.md)"
else
echo "configured=true" >> "$GITHUB_OUTPUT"
fi
- name: Checkout code
if: steps.aur.outputs.configured == 'true'
uses: actions/checkout@v4
- name: Bump PKGBUILD version
if: steps.aur.outputs.configured == 'true'
run: |
set -euo pipefail
TAG="${GITHUB_REF#refs/tags/v}"
PKGBUILD=packaging/aur/vocalinux/PKGBUILD
sed -i "s/^pkgver=.*/pkgver=${TAG//-/}/; s/^_tag=.*/_tag=${TAG}/; s/^pkgrel=.*/pkgrel=1/" "$PKGBUILD"
grep -E '^(pkgver|_tag|pkgrel)=' "$PKGBUILD"
- name: Publish AUR package
if: steps.aur.outputs.configured == 'true'
uses: KSXGitHub/github-actions-deploy-aur@v4.2.0
with:
pkgname: vocalinux
pkgbuild: packaging/aur/vocalinux/PKGBUILD
updpkgsums: 'true'
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: 'Release ${{ github.ref_name }}'
deploy-website:
name: Deploy Website
runs-on: ubuntu-latest
+8
View File
@@ -158,6 +158,14 @@ curl -fsSL raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh -o /
```
Lightweight option (~40MB), works on systems with 4GB RAM.
### Arch Linux (AUR)
```bash
yay -S vocalinux
```
See [docs/AUR.md](docs/AUR.md).
### Alternative: Install from Source
```bash
+33
View File
@@ -0,0 +1,33 @@
# AUR
## Users
```bash
yay -S vocalinux # latest release tag
yay -S vocalinux-git # community package, tracks main
```
`vocalinux` and `vocalinux-git` conflict. Install only one.
## Maintainers (one-time)
Release tags auto-push `packaging/aur/vocalinux/PKGBUILD` when these secrets exist:
| Secret | Value |
|--------|--------|
| `AUR_SSH_PRIVATE_KEY` | Private key whose public half is on your AUR account |
| `AUR_USERNAME` | AUR username (git author) |
| `AUR_EMAIL` | AUR account email |
```bash
# 1. AUR account + SSH pubkey: https://aur.archlinux.org/register
ssh-keygen -t ed25519 -C "vocalinux-aur" -f ./aur_ed25519 -N ""
# upload aur_ed25519.pub on AUR; put aur_ed25519 in AUR_SSH_PRIVATE_KEY
# 2. Create empty package once
git clone ssh://aur@aur.archlinux.org/vocalinux.git
# 3. Next v* tag runs Publish to AUR (skipped if secret missing)
```
Sources: `packaging/aur/vocalinux/PKGBUILD`. Community git package: https://aur.archlinux.org/packages/vocalinux-git
+6
View File
@@ -67,6 +67,12 @@ vocalinux
**Arch Linux:**
```bash
yay -S vocalinux
```
See [AUR.md](AUR.md). Or via PyPI:
```bash
sudo pacman -S --needed \
python python-virtualenv python-gobject gtk3 libappindicator-gtk3 \
+68
View File
@@ -0,0 +1,68 @@
# Maintainer: Jatin K Malik <jatinkrmalik@gmail.com>
# Updated by .github/workflows/release.yml on v* tags. Setup: docs/AUR.md
pkgname=vocalinux
# AUR pkgver cannot contain hyphens (v0.14.0-beta -> 0.14.0beta).
pkgver=0.14.0beta
_tag=0.14.0-beta
pkgrel=1
pkgdesc="Free, offline voice dictation for Linux"
arch=('any')
url="https://github.com/jatinkrmalik/vocalinux"
license=('GPL-3.0-only')
depends=(
'python>=3.9'
'python-gobject'
'gtk3'
'libappindicator-gtk3'
'ibus'
'gobject-introspection'
'python-cairo'
'python-pynput'
'python-pywhispercpp-cpu'
'python-pyaudio'
'portaudio'
'python-numpy'
'python-requests'
'python-tqdm'
'python-psutil'
'python-lxml'
'python-pydub'
'python-evdev'
'python-xlib'
'xclip'
'wl-clipboard'
'wtype'
'hicolor-icon-theme'
)
makedepends=(
'python-build'
'python-installer'
'python-wheel'
'python-setuptools'
)
optdepends=(
'python-pywhispercpp-cuda: NVIDIA GPU (replace python-pywhispercpp-cpu)'
'python-onnxruntime: Silero VAD'
'xdotool: X11 injection fallback'
)
conflicts=('vocalinux-git')
source=("${pkgname}-${_tag}.tar.gz::https://github.com/jatinkrmalik/vocalinux/archive/refs/tags/v${_tag}.tar.gz")
sha256sums=('030dfe1ddbc51672c7bfb0f471c256a998fe871bd190028dd882e4507d00af58')
build() {
cd "${pkgname}-${_tag}"
python -m build --wheel --no-isolation
}
package() {
cd "${pkgname}-${_tag}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 vocalinux.desktop "${pkgdir}/usr/share/applications/vocalinux.desktop"
for icon in resources/icons/scalable/*.svg; do
install -Dm644 "$icon" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/$(basename "$icon")"
done
}