From 5d23a586fa809156188039418009c965b6dbe888 Mon Sep 17 00:00:00 2001 From: Breadway Date: Fri, 17 Jul 2026 14:06:35 +0800 Subject: [PATCH] Add missing bakery-channel release.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .forgejo/workflows/release.yml | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .forgejo/workflows/release.yml diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..8fa9fad --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -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