Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
cc456b7
refactor: remove remote module install, extract bread-sync, make CI real
Breadway May 16, 2026
114c9e2
Revert to v0.6
Breadway May 17, 2026
e57f085
Fix CI tar path
Breadway May 17, 2026
76e503b
Add bakery.toml and release workflow
Breadway Jun 6, 2026
0f430e8
fix: add missing build deps for hestia (Ubuntu) runner
Breadway Jun 6, 2026
109b11c
fix: skip integration tests in CI (require live daemon)
Breadway Jun 6, 2026
a9b1992
fix: create GitHub Release before uploading artifacts
Breadway Jun 6, 2026
3025c48
fix: add contents: write permission for GitHub Release creation
Breadway Jun 6, 2026
db4d82f
fix: use relative symlink for latest to work inside Docker containers
Breadway Jun 7, 2026
9bbadc5
fix: update system_deps to accurate Arch package names
Breadway Jun 11, 2026
32982b9
chore: bump version to 0.6.1
Breadway Jun 11, 2026
3ccb041
chore: update Cargo.lock for v0.6.1
Breadway Jun 11, 2026
4446b5e
Add Forgejo Actions workflows for mirroring and package publishing
Breadway Jun 13, 2026
c70c9a7
Fix Forgejo workflows for the actual server capabilities
Breadway Jun 13, 2026
73f01e9
Rename mirror secret to MIRROR_TOKEN (GITHUB_ prefix is reserved)
Breadway Jun 13, 2026
d454e83
Clone from public URL, not GITHUB_SERVER_URL (resolves to localhost i…
Breadway Jun 13, 2026
64e756f
Disable LTO in PKGBUILD to fix vendored Lua static link
Breadway Jun 13, 2026
623560c
Use REGISTRY_TOKEN (scoped write:package) for registry publish
Breadway Jun 13, 2026
1529151
Disable debug package so the main package publishes correctly
Breadway Jun 13, 2026
954b7f3
Add ready-to-use example modules
Breadway Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .forgejo/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Mirror to GitHub

on:
push:
branches: ['**']
tags: ['**']

jobs:
mirror:
runs-on: [self-hosted, hestia]
steps:
- name: Mirror to GitHub
run: |
set -euo pipefail
git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git
cd repo.git
# Mirror only branches and tags (not refs/pull/*, which GitHub rejects);
# --prune deletes GitHub refs that no longer exist on Forgejo.
git push --prune \
"https://x-access-token:${{ secrets.MIRROR_TOKEN }}@github.com/Breadway/bread.git" \
'+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
40 changes: 40 additions & 0 deletions .forgejo/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and publish package

on:
push:
tags: ['v*']

jobs:
package:
runs-on: [self-hosted, hestia]
container:
image: archlinux:latest
steps:
# Note: no actions/checkout — the archlinux image has no Node, which JS
# actions require. Everything runs as shell steps and clones manually.
- name: Build and publish
env:
PUBLISH_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
pacman -Syu --noconfirm base-devel git rust cargo libgit2 openssl
useradd -m builder
git config --global --add safe.directory '*'
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" /home/builder/src
cd /home/builder/src
git archive --format=tar.gz --prefix="bread-${VERSION}/" HEAD \
> packaging/arch/bread-${VERSION}.tar.gz
SHA=$(sha256sum packaging/arch/bread-${VERSION}.tar.gz | awk '{print $1}')
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" packaging/arch/PKGBUILD
sed -i "s/^sha256sums=.*/sha256sums=('${SHA}')/" packaging/arch/PKGBUILD
chown -R builder:builder /home/builder/src
# --nocheck: packaging builds the artifact; tests belong in a CI job.
su builder -c "cd /home/builder/src/packaging/arch && makepkg -f --noconfirm --nocheck"
PKG=$(find /home/builder/src/packaging/arch -name '*.pkg.tar.zst' | head -1)
curl -fsS -X PUT \
-H "Authorization: token ${PUBLISH_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@${PKG}" \
"https://git.breadway.dev/api/packages/Breadway/arch/os"
24 changes: 13 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@ name: CI

on:
push:
branches: [ main ]
branches: [ master, dev ]
pull_request:
branches: [ main ]
branches: [ master, dev ]

jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: stable
components: clippy, rustfmt
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev pkg-config
- name: Cargo cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
- name: Format check
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Build
run: cargo build --workspace --verbose
- name: Run tests
Expand All @@ -34,9 +36,9 @@ jobs:
- name: Package artifacts
run: |
mkdir -p dist
tar -czf dist/bread-${{ matrix.os }}.tgz target/release/breadd target/release/bread-cli
tar -czf dist/bread-ubuntu-latest.tgz target/release/breadd target/release/bread
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bread-${{ matrix.os }}
name: bread-ubuntu-latest
path: dist/*.tgz
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: release

on:
push:
tags: ["v*"]

permissions:
contents: write

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 build deps
run: sudo apt-get install -y libudev-dev libdbus-1-dev pkg-config 2>/dev/null || true

- name: build
run: cargo build --release --locked

- name: test
run: cargo test --release --locked --workspace --lib

- name: prepare artifacts
run: |
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="${DL_DIR}/bread/${VERSION}"
mkdir -p "${PKG_DIR}"
for bin in breadd bread; 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/systemd/breadd.service "${PKG_DIR}/"
cp bakery.toml "${PKG_DIR}/bakery.toml"
ln -sfn "${VERSION}" "${DL_DIR}/bread/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}/bread/${VERSION}"
gh release create "${GITHUB_REF_NAME}" \
--title "bread v${VERSION}" --generate-notes 2>/dev/null || true
gh release upload "${GITHUB_REF_NAME}" \
"${PKG_DIR}/breadd-x86_64" \
"${PKG_DIR}/bread-x86_64" \
"${PKG_DIR}/breadd-x86_64.sha256" \
"${PKG_DIR}/bread-x86_64.sha256" \
--clobber
Loading
Loading