A swayidle-shaped daemon: `present <cmd>` runs when a Bluetooth LE device comes within an RSSI threshold, `absent <secs> <cmd>` once nobody has for that long. Near means 3 of the last 5 advertisements at or above -58 dBm by default; --calibrate prints the raw stream so the threshold is picked at the installed screen, not guessed. Nothing is stored: a few seconds of samples in memory, counted. Packaged for the [uhhm] registry from the checkout itself, built natively per arch on tag by Gitea Actions, with the version checked across Cargo.toml, PKGBUILD and the tag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
commit
8fe75daad6
@@ -0,0 +1,61 @@
|
||||
name: Release
|
||||
|
||||
# A v* tag builds the Arch package natively per arch and uploads it to the
|
||||
# [uhhm] registry (namespace bl, as pacman.conf points there). REGISTRY_TOKEN
|
||||
# is a bl write:package token added as a repo secret; org repos do not inherit
|
||||
# user-level secrets.
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
PACKAGER: uhhm CI <bendik@lynghaug.me>
|
||||
# Arch Linux ARM's makepkg.conf (klokka) differs from Arch's: pin where
|
||||
# packages land and their format, so publish-registry finds them.
|
||||
PKGDEST: .
|
||||
PKGEXT: .pkg.tar.zst
|
||||
|
||||
jobs:
|
||||
# runner-1 (Docker on ergo): Arch container on the ubuntu-latest label.
|
||||
x86_64:
|
||||
runs-on: ubuntu-latest
|
||||
container: archlinux:latest
|
||||
steps:
|
||||
- name: Prepare container
|
||||
run: pacman -Syu --noconfirm --needed base-devel git rust dbus
|
||||
- name: Checkout
|
||||
uses: builtin:checkout
|
||||
- name: Check tag, PKGBUILD and Cargo.toml agree
|
||||
run: scripts/check-version "${GITHUB_REF_NAME#v}"
|
||||
- name: Build
|
||||
run: |
|
||||
useradd -m builder
|
||||
chown -R builder: .
|
||||
sudo -u builder --preserve-env=PACKAGER,PKGDEST,PKGEXT makepkg -f --noconfirm
|
||||
- name: Publish to the Arch package registry
|
||||
run: scripts/publish-registry .
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
REGISTRY_URL: ${{ gitea.server_url }}/api/packages/bl/arch/uhhm
|
||||
|
||||
# klokka: bare Arch Linux ARM host. Nothing is installed with pacman there;
|
||||
# cargo comes from the rustup toolchain the action keeps in the runner's
|
||||
# home, hence -d (makepkg would otherwise look for a cargo *package*).
|
||||
# libdbus is on the host already (bluez pulls it in).
|
||||
aarch64:
|
||||
runs-on: aarch64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: builtin:checkout
|
||||
- name: Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Check tag, PKGBUILD and Cargo.toml agree
|
||||
run: scripts/check-version "${GITHUB_REF_NAME#v}"
|
||||
- name: Build
|
||||
run: makepkg -f -d --noconfirm
|
||||
- name: Publish to the Arch package registry
|
||||
run: scripts/publish-registry .
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
REGISTRY_URL: ${{ gitea.server_url }}/api/packages/bl/arch/uhhm
|
||||
Reference in New Issue
Block a user