From f0950a39bedbd3f3ee6e381eac91ad39a5f55688 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 1af20ea..5840e5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,3 +54,4 @@ jobs: MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }} MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }} MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }} + AUR_KEY: ${{ secrets.AUR_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c1564ff..54aee8c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -152,3 +152,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 a0d1386..c421e8a 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,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.