Refactor theme onto bread-theme; add bakery.toml and release workflow

- Cargo.toml: depend on bread-theme (path dep for local dev, git dep for
  production) with gtk feature; remove local theme dependencies
- src/theme.rs: replace local pywal/Catppuccin impl with bread_theme::gtk
  helpers; local bar-specific CSS is preserved
- bakery.toml: describes breadbar for bakery install
- release.yml: builds on hestia self-hosted runner, publishes binary to
  dl.breadway.dev and GitHub Releases on v* tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-06 22:31:10 +08:00
parent 9b9705520e
commit 9e829d3663
8 changed files with 456 additions and 114 deletions

56
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: release
on:
push:
tags: ["v*"]
env:
DL_DIR: /srv/breadway-dl
ECOSYSTEM_DIR: /home/breadway/Projects/bread-ecosystem
jobs:
build:
runs-on: [self-hosted, hestia]
steps:
- uses: actions/checkout@v4
- name: install system deps
run: sudo pacman -S --noconfirm gtk4 gtk4-layer-shell iw 2>/dev/null || true
- name: build
run: cargo build --release --locked
- name: prepare artifacts
run: |
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="${DL_DIR}/breadbar/${VERSION}"
mkdir -p "${PKG_DIR}"
cp target/release/breadbar "${PKG_DIR}/breadbar-x86_64"
strip "${PKG_DIR}/breadbar-x86_64"
sha256sum "${PKG_DIR}/breadbar-x86_64" | awk '{print $1}' \
> "${PKG_DIR}/breadbar-x86_64.sha256"
cp bakery.toml "${PKG_DIR}/bakery.toml"
ln -sfn "${PKG_DIR}" "${DL_DIR}/breadbar/latest"
- name: ensure bread-ecosystem
run: |
if [[ -d "${ECOSYSTEM_DIR}/.git" ]]; then
git -C "${ECOSYSTEM_DIR}" pull --ff-only
else
mkdir -p "$(dirname "${ECOSYSTEM_DIR}")"
git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}"
fi
- name: regenerate index.json
run: bash "${ECOSYSTEM_DIR}/scripts/gen-index.sh"
- name: upload to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="${DL_DIR}/breadbar/${VERSION}"
gh release upload "${GITHUB_REF_NAME}" \
"${PKG_DIR}/breadbar-x86_64" \
"${PKG_DIR}/breadbar-x86_64.sha256" \
--clobber