Add missing bakery-channel release.yml

bos-settings has had a bakery.toml, a PKGBUILD, and package.yml
(pacman channel) for a while, but never got the release.yml needed to
actually publish to dl.breadway.dev / GitHub releases for the bakery
channel — despite bos/DESIGN.md documenting the intent to make it
bakery-installable standalone. Modeled on breadmon/release.yml (same
shape: single binary, no systemd service). Paired with a new registry
entry in bread-ecosystem-fix-worktree.

Note for whoever runs this for real: bos-settings' Cargo.toml currently
has bread-utils pinned via a path dependency
(../bread-ecosystem-fix-worktree/bread-utils) rather than the tag-pinned
git dependency bread-theme uses — there's already a TODO on that line.
This release.yml (and the existing package.yml) will fail to build in a
clean CI checkout until that's resolved; pre-existing issue, not
something this pass touched.
This commit is contained in:
Breadway 2026-07-17 14:06:35 +08:00
parent 041d927b00
commit 5d23a586fa

View file

@ -0,0 +1,53 @@
name: release
on:
push:
tags: ["v*"]
jobs:
build:
runs-on: [self-hosted, hestia]
steps:
- name: checkout
run: |
set -euo pipefail
rm -rf src && mkdir src
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
- name: build
run: cd src && cargo build --release --locked
- name: prepare artifacts
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="/srv/breadway-dl/bos-settings/${VERSION}"
mkdir -p "${PKG_DIR}"
cp "src/target/release/bos-settings" "${PKG_DIR}/bos-settings-x86_64"
strip "${PKG_DIR}/bos-settings-x86_64"
sha256sum "${PKG_DIR}/bos-settings-x86_64" | awk '{print $1}' \
> "${PKG_DIR}/bos-settings-x86_64.sha256"
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
ln -sfn "${VERSION}" "/srv/breadway-dl/bos-settings/latest"
- name: regenerate index.json
run: |
set -euo pipefail
rm -rf /tmp/bread-ecosystem-ci
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git /tmp/bread-ecosystem-ci
bash /tmp/bread-ecosystem-ci/scripts/gen-index.sh
- name: upload to GitHub Release
env:
GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="/srv/breadway-dl/bos-settings/${VERSION}"
gh release create "${GITHUB_REF_NAME}" --repo Breadway/bos-settings \
--title "bos-settings v${VERSION}" --generate-notes 2>/dev/null || true
gh release upload "${GITHUB_REF_NAME}" --repo Breadway/bos-settings \
"${PKG_DIR}/bos-settings-x86_64" \
"${PKG_DIR}/bos-settings-x86_64.sha256" \
--clobber