Add packaging/arch PKGBUILD and Forgejo Actions workflows
Some checks failed
Mirror to GitHub / mirror (push) Failing after 26s

- packaging/arch/PKGBUILD: builds and publishes breadbox to [breadway] repo
- .forgejo/workflows/mirror.yml: mirrors every push/tag to GitHub
- .forgejo/workflows/package.yml: builds on tag, publishes to Forgejo registry

Requires FORGEJO_TOKEN and GITHUB_MIRROR_TOKEN secrets in Forgejo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-13 12:12:42 +08:00
parent a38b867583
commit 6a2bd2864b
3 changed files with 101 additions and 0 deletions

View file

@ -0,0 +1,20 @@
name: Mirror to GitHub
on:
push:
branches: ['**']
tags: ['**']
jobs:
mirror:
runs-on: [self-hosted, hestia]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to GitHub
run: |
git remote add github \
"https://x-access-token:${{ secrets.GITHUB_MIRROR_TOKEN }}@github.com/Breadway/breadbox.git"
git push github --mirror

View file

@ -0,0 +1,46 @@
name: Build and publish package
on:
push:
tags: ['v*']
jobs:
package:
runs-on: [self-hosted, hestia]
container:
image: archlinux:latest
options: --privileged
steps:
- uses: actions/checkout@v4
- name: Set version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Install build dependencies
run: pacman -Syu --noconfirm base-devel git rust cargo gtk4 gtk4-layer-shell librsvg
- name: Create builder user
run: useradd -m builder
- name: Prepare source
run: |
git archive --format=tar.gz \
--prefix=breadbox-${VERSION}/ \
HEAD > packaging/arch/breadbox-${VERSION}.tar.gz
SHA=$(sha256sum packaging/arch/breadbox-${VERSION}.tar.gz | awk '{print $1}')
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" packaging/arch/PKGBUILD
sed -i "s/^sha256sums=.*/sha256sums=('${SHA}')/" packaging/arch/PKGBUILD
cp -r . /home/builder/src
chown -R builder:builder /home/builder/src
- name: Build package
run: su builder -c "cd /home/builder/src/packaging/arch && makepkg -sf --noconfirm"
- name: Publish to Forgejo registry
run: |
PKG=$(find /home/builder/src/packaging/arch -name '*.pkg.tar.zst' | head -1)
curl -fsS -X PUT \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
--upload-file "${PKG}" \
"https://git.breadway.dev/api/packages/breadway/arch/push?distrib=breadway"

35
packaging/arch/PKGBUILD Normal file
View file

@ -0,0 +1,35 @@
# Maintainer: Breadway <rileyhorsham@gmail.com>
pkgname=breadbox
pkgver=0.1.0
pkgrel=1
pkgdesc="App launcher for Hyprland / Wayland"
arch=('x86_64')
url="https://github.com/Breadway/breadbox"
license=('MIT')
depends=('gtk4' 'gtk4-layer-shell' 'librsvg')
optdepends=(
'hyprland: window and workspace integration'
)
makedepends=('rust' 'cargo')
source=("${pkgname}-${pkgver}.tar.gz")
sha256sums=('SKIP')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
cargo build --release --locked
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
cargo test --release --locked --workspace
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -Dm755 target/release/breadbox "${pkgdir}/usr/bin/breadbox"
install -Dm755 target/release/breadbox-sync "${pkgdir}/usr/bin/breadbox-sync"
install -Dm644 packaging/breadbox-sync.service \
"${pkgdir}/usr/lib/systemd/user/breadbox-sync.service"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}