From 90b87501363210969da2b154ba3da7257c390b4a Mon Sep 17 00:00:00 2001 From: Peter Fern Date: Sun, 10 Mar 2024 10:19:26 +1100 Subject: [PATCH] build(ci): Add AUR update action --- .github/workflows/aur.yml | 37 +++++++++++++++++++++++++++++++++++++ aur/hyprpanel-bin/PKGBUILD | 30 ++++++++++++++++++++++++++++++ aur/hyprpanel/PKGBUILD | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 .github/workflows/aur.yml create mode 100644 aur/hyprpanel-bin/PKGBUILD create mode 100644 aur/hyprpanel/PKGBUILD diff --git a/.github/workflows/aur.yml b/.github/workflows/aur.yml new file mode 100644 index 0000000..5311cdb --- /dev/null +++ b/.github/workflows/aur.yml @@ -0,0 +1,37 @@ +name: AUR + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + aur: + environment: + name: aur-update + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: AUR update (hyprpanel) + uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 + with: + pkgname: hyprpanel + pkgbuild: ./aur/hyprpanel/PKGBUILD + updpkgsums: true + test: true + commit_username: ${{ secrets.AUR_USERNAME }} + commit_email: ${{ secrets.AUR_EMAIL }} + ssh_private_key: ${{ secrets.AUR_KEY }} + - name: AUR update (hyprpanel-bin) + uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 + with: + pkgname: hyprpanel-bin + pkgbuild: ./aur/hyprpanel-bin/PKGBUILD + updpkgsums: true + test: true + commit_username: ${{ secrets.AUR_USERNAME }} + commit_email: ${{ secrets.AUR_EMAIL }} + ssh_private_key: ${{ secrets.AUR_KEY }} \ No newline at end of file diff --git a/aur/hyprpanel-bin/PKGBUILD b/aur/hyprpanel-bin/PKGBUILD new file mode 100644 index 0000000..f943ac3 --- /dev/null +++ b/aur/hyprpanel-bin/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Peter Fern + +pkgname=hyprpanel-bin +_pkgname=${pkgname%-bin} +pkgver=0.1.2 +pkgrel=3 +pkgdesc="An opinionated panel/shell for the Hyprland compositor." +arch=('x86_64' 'aarch64') +url="https://github.com/pdf/hyprpanel" +license=('MIT') +provides=("$_pkgname") +conflicts=("$_pkgname") +options=('!strip') +depends=('gtk4' 'gtk4-layer-shell' 'hyprland') +optdepends=('systemd: logging support' + 'pulse-native-provider: volume control support' + 'upower: battery status support') +_src="${url}/releases/download/v${pkgver}/hyprpanel_Linux" +source_x86_64=("${pkgname}-${pkgver}-x86_64.tar.gz::${_src}_x86_64.tar.gz") +source_aarch64=("${pkgname}-${pkgver}-aarch64.tar.gz::${_src}_arm64.tar.gz") +sha256sums_x86_64=('8276c75b11d21a973eeba9fdac113b302c2ec82f6347200ec7a11207a2cf661c') +sha256sums_aarch64=('8276c75b11d21a973eeba9fdac113b302c2ec82f6347200ec7a11207a2cf661c') + +package() { + install -Dm644 "${srcdir}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm755 "${srcdir}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + install -Dm755 "${srcdir}/${_pkgname}-client" "${pkgdir}/usr/bin/${_pkgname}-client" +} + +# vim:set ts=2 sw=2 et: diff --git a/aur/hyprpanel/PKGBUILD b/aur/hyprpanel/PKGBUILD new file mode 100644 index 0000000..d03f398 --- /dev/null +++ b/aur/hyprpanel/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Peter Fern + +pkgname=hyprpanel +pkgver=0.1.2 +pkgrel=1 +pkgdesc="An opinionated panel/shell for the Hyprland compositor." +arch=('x86_64' 'aarch64') +url="https://github.com/pdf/hyprpanel" +license=('MIT') +options=('!strip') +depends=('gtk4' 'gtk4-layer-shell' 'hyprland') +optdepends=('systemd: logging support' + 'pulse-native-provider: volume control support' + 'upower: battery status support') +makedepends=('git' 'go') +source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz") + +build() { + export CGO_ENABLED=0 + cd "${pkgname}-${pkgver}" + go build -o "${pkgname}" "./cmd/${pkgname}" + go build -o "${pkgname}-client" "./cmd/${pkgname}-client" +} + +package() { + install -Dm644 "${pkgname}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm755 "${pkgname}-${pkgver}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm755 "${pkgname}-${pkgver}/${pkgname}-client" "${pkgdir}/usr/bin/${pkgname}-client" +} + +# vim:set ts=2 sw=2 et: +sha256sums=('43b88a20a25acd5d2a2fa8eab50d158ff849c977a4cfe548008db65324d86922')