Refactor theme onto bread-theme; add bakery.toml and release workflow
- breadbox/Cargo.toml: depend on bread-theme with gtk feature
- breadbox/src/main.rs: remove local Palette + hex_to_rgba; use
bread_theme::{load_palette, hex_to_rgba, gtk::apply_user_css}
- bakery.toml: describes breadbox for bakery install
- release.yml: builds on hestia self-hosted runner, publishes binaries 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:
parent
81319dd584
commit
53756e840a
5 changed files with 251 additions and 73 deletions
62
.github/workflows/release.yml
vendored
Normal file
62
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
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 librsvg 2>/dev/null || true
|
||||
|
||||
- name: build
|
||||
run: cargo build --release --locked
|
||||
|
||||
- name: prepare artifacts
|
||||
run: |
|
||||
VERSION="${GITHUB_REF_NAME#v}"
|
||||
PKG_DIR="${DL_DIR}/breadbox/${VERSION}"
|
||||
mkdir -p "${PKG_DIR}"
|
||||
for bin in breadbox breadbox-sync; do
|
||||
cp "target/release/${bin}" "${PKG_DIR}/${bin}-x86_64"
|
||||
strip "${PKG_DIR}/${bin}-x86_64"
|
||||
sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \
|
||||
> "${PKG_DIR}/${bin}-x86_64.sha256"
|
||||
done
|
||||
cp packaging/breadbox-sync.service "${PKG_DIR}/"
|
||||
cp config.example.toml "${PKG_DIR}/"
|
||||
cp bakery.toml "${PKG_DIR}/bakery.toml"
|
||||
ln -sfn "${PKG_DIR}" "${DL_DIR}/breadbox/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}/breadbox/${VERSION}"
|
||||
gh release upload "${GITHUB_REF_NAME}" \
|
||||
"${PKG_DIR}/breadbox-x86_64" \
|
||||
"${PKG_DIR}/breadbox-sync-x86_64" \
|
||||
"${PKG_DIR}/breadbox-x86_64.sha256" \
|
||||
"${PKG_DIR}/breadbox-sync-x86_64.sha256" \
|
||||
--clobber
|
||||
Loading…
Add table
Add a link
Reference in a new issue