Add standalone repo scaffolding (README, packaging, CI)
Adds the release/CI machinery bos-settings already has in its own repo: Forgejo package.yml (tag -> build -> publish to [breadway]) and mirror.yml (Forgejo -> GitHub). PKGBUILD updated for the flattened layout and dropped -p breadhelp now that this isn't a workspace member.
This commit is contained in:
parent
29b2445573
commit
15b0383c21
7 changed files with 162 additions and 5 deletions
21
.forgejo/workflows/mirror.yml
Normal file
21
.forgejo/workflows/mirror.yml
Normal file
|
|
@ -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/breadhelp.git" \
|
||||
'+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
|
||||
40
.forgejo/workflows/package.yml
Normal file
40
.forgejo/workflows/package.yml
Normal file
|
|
@ -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 gtk4 glib2
|
||||
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="breadhelp-${VERSION}/" HEAD \
|
||||
> packaging/breadhelp-${VERSION}.tar.gz
|
||||
SHA=$(sha256sum packaging/breadhelp-${VERSION}.tar.gz | awk '{print $1}')
|
||||
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" packaging/PKGBUILD
|
||||
sed -i "s/^sha256sums=.*/sha256sums=('${SHA}')/" packaging/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 && makepkg -f --noconfirm --nocheck"
|
||||
PKG=$(find /home/builder/src/packaging -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"
|
||||
34
.gitignore
vendored
Normal file
34
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Rust build artifacts
|
||||
/target/
|
||||
**/*.pdb
|
||||
|
||||
# Editor / IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.direnv/
|
||||
|
||||
# OS artifacts
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
|
||||
# Environment / secrets
|
||||
.env
|
||||
.env.local
|
||||
*.env.*
|
||||
secrets/
|
||||
*.pem
|
||||
*.key
|
||||
*.p12
|
||||
|
||||
# Runtime / logs
|
||||
*.log
|
||||
logs/
|
||||
*.pid
|
||||
*.sock
|
||||
|
||||
# Claude Code local agent state
|
||||
.claude/
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 Breadway
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
15
README.md
Normal file
15
README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# breadhelp
|
||||
|
||||
Onboarding and help center for [BOS (Bread Operating System)](https://github.com/Breadway/bos) — GTK4, a searchable guide library, an interactive keybind viewer, a troubleshooting wizard with one-click fixes, and a live guided tour overlay that spotlights real on-screen bread\* apps (breadbar, breadbox, ...) instead of walking through a static wizard.
|
||||
|
||||
Split out of the `bos` repo into its own repo so a breadhelp release doesn't require a BOS ISO release, and vice versa. Pacman-packaged (not bakery-managed) — see `packaging/README.md`.
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
## Packaging / releasing
|
||||
|
||||
See `packaging/README.md`. In short: bump `Cargo.toml`'s version, tag `vX.Y.Z`, push the tag to both remotes — `.forgejo/workflows/package.yml` builds and publishes to the `[breadway]` pacman repo automatically.
|
||||
|
|
@ -5,7 +5,7 @@ pkgver=0.1.0
|
|||
pkgrel=1
|
||||
pkgdesc="Onboarding and help center for Bread OS"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/Breadway/bos"
|
||||
url="https://github.com/Breadway/breadhelp"
|
||||
license=('MIT')
|
||||
# Some Rust deps (ring/mlua) build vendored C/asm into static archives; makepkg's
|
||||
# default -flto=auto emits GCC LTO bitcode the Rust (lld) link cannot read,
|
||||
|
|
@ -21,20 +21,20 @@ sha256sums=('SKIP')
|
|||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
cargo build --release --locked -p breadhelp
|
||||
cargo build --release --locked
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
cargo test --release --locked -p breadhelp
|
||||
cargo test --release --locked
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
install -Dm755 target/release/breadhelp "${pkgdir}/usr/bin/breadhelp"
|
||||
install -Dm644 packaging/arch/breadhelp/breadhelp.desktop \
|
||||
install -Dm644 packaging/breadhelp.desktop \
|
||||
"${pkgdir}/usr/share/applications/breadhelp.desktop"
|
||||
install -d "${pkgdir}/usr/share/breadhelp"
|
||||
cp -r breadhelp/content "${pkgdir}/usr/share/breadhelp/content"
|
||||
cp -r content "${pkgdir}/usr/share/breadhelp/content"
|
||||
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
|
|
|||
26
packaging/README.md
Normal file
26
packaging/README.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Arch packaging
|
||||
==============
|
||||
|
||||
`PKGBUILD` builds and installs `breadhelp` from source.
|
||||
|
||||
## Local build
|
||||
|
||||
```bash
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
## Before publishing to [breadway] repo
|
||||
|
||||
1. Tag a release on GitHub.
|
||||
2. Update `pkgver` to match the tag.
|
||||
3. Update `source` to the release tarball URL.
|
||||
4. Run `updpkgsums` (or manually set `sha256sums`).
|
||||
|
||||
## Runtime dependencies
|
||||
|
||||
| Package | Required | Notes |
|
||||
|---------|----------|-------|
|
||||
| `gtk4` | yes | UI toolkit |
|
||||
| `glib2` | yes | always |
|
||||
| `gtk4-layer-shell` | yes | tour overlay (dim mask + spotlight callout) |
|
||||
| `snapper` | optional | create-backup one-click fix |
|
||||
Loading…
Add table
Add a link
Reference in a new issue