Skip to content

Commit

Permalink
build(ci): Add AUR update action
Browse files Browse the repository at this point in the history
  • Loading branch information
pdf committed Mar 9, 2024
1 parent e649b4f commit 90b8750
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/aur.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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 }}
30 changes: 30 additions & 0 deletions aur/hyprpanel-bin/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Maintainer: Peter Fern <aur at 0xc0dedbad dot com>

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:
32 changes: 32 additions & 0 deletions aur/hyprpanel/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Maintainer: Peter Fern <aur at 0xc0dedbad dot com>

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')

0 comments on commit 90b8750

Please sign in to comment.