From 67c4db1d18e61298df4576cdabebb625e582237a Mon Sep 17 00:00:00 2001 From: Jarrett Lusso Date: Tue, 26 May 2026 09:14:27 -0400 Subject: [PATCH] Publish Arch Linux PKGBUILD to the AUR Adds an `aurs` block that pushes an `emailable-bin` `PKGBUILD` to the AUR on each release, plus a README entry pointing Arch users at `yay -S emailable-bin`. Gated on `IsSnapshot`: `make release-snapshot` skips AUR publishing (no `AUR_KEY` needed locally), while real tag builds fail loudly if `AUR_KEY` is missing rather than silently shipping a release that doesn't update the AUR package. The PR should land only after the maintainer account is approved and the secret is wired into CI. --- .github/workflows/release.yml | 1 + .goreleaser.yaml | 22 ++++++++++++++++++++++ README.md | 6 ++++++ 3 files changed, 29 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2125fd1..47e3ac1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,3 +49,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} + AUR_KEY: ${{ secrets.AUR_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2ba8892..01c9822 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -133,3 +133,25 @@ scoops: # Skip the upload when the token is missing so `make release-snapshot` # and the first release (before the bucket repo exists) keep working. skip_upload: '{{ if eq .Env.RELEASE_GITHUB_TOKEN "" }}true{{ else }}auto{{ end }}' + +aurs: + - name: emailable-bin + ids: + - emailable + # Skipped for snapshots so `make release-snapshot` works without + # AUR_KEY; tag builds fail loudly if the secret is missing. + disable: '{{ .IsSnapshot }}' + homepage: https://emailable.com + description: Official command-line interface for the Emailable API. + maintainers: + - "Emailable " + license: MIT + private_key: "{{ .Env.AUR_KEY }}" + git_url: "ssh://aur@aur.archlinux.org/emailable-bin.git" + skip_upload: auto + package: |- + install -Dm755 "./emailable" "${pkgdir}/usr/bin/emailable" + install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + for page in ./man/*.1; do + install -Dm644 "$page" "${pkgdir}/usr/share/man/man1/$(basename "$page")" + done diff --git a/README.md b/README.md index 9a495be..8a2447e 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ scoop bucket add emailable https://github.com/emailable/scoop-bucket scoop install emailable ``` +**Arch Linux (AUR):** + +```bash +yay -S emailable-bin +``` + In each snippet below, set `ver`/`arch` to the release you want (use `arch=arm64` on ARM). The `checksums.txt` step verifies the download before installing — these are GitHub-hosted artifacts, not served from a signed repo.