Files
forust 1a77043a71 fix: editor split, stop flag in actions, write errors, history on failure, expect panic, string match
- src/main.rs: split VISUAL/EDITOR into prog+args, drop expect panic in reap_timer, propagate write_timer errors, check stop during actions, record history on partial failure, use const for stop msg
- Cargo.toml: add authors/homepage, bump noyalib 0.0.12->0.0.13
- release.yaml: tighten tag glob, fix curl 404 fallback, URI-encode asset name, upgrade upload-artifact v3->v4
- ci.yaml: add cargo cache step
- README.md: sync feature list, fix push to two-step
- RELEASING.md: clarify Cargo.lock regeneration
2026-07-07 23:13:19 +02:00

2.7 KiB

Releasing

This repository uses semantic versioning and Gitea tag-based releases.

Repository Description

Use this short description in Gitea:

Rust TUI sleep timer for Linux desktop actions.

Optional longer description:

A single-binary Linux sleep timer with YAML config, command preview, progress display, and post-countdown desktop actions for niri, Hyprland, KDE, media, brightness, audio, lock, power, process kill, and custom shell commands.

Upstream

git remote add origin ssh://git@gitssh.forust.xyz:2221/forust/gosleep.git
git remote set-url --push origin ssh://git@gitssh.forust.xyz:2221/forust/gosleep.git

HTTPS remote URL:

https://gitea.forust.xyz/forust/gosleep.git

Gitea Actions Setup

  1. Enable Actions for forust/gosleep.
  2. Register or select a Linux runner with labels used by the workflows: self-hosted, linux, arch, homelab.
  3. Ensure the runner has:
    • Rust stable toolchain
    • rustfmt
    • clippy
    • curl
    • jq
    • sha256sum
    • Docker, if using the YAML lint job as written
  4. Confirm Actions job token permissions allow contents: write. The release workflow uses Gitea Actions' built-in GITEA_TOKEN, exposed in the workflow as ${{ secrets.GITEA_TOKEN }}; no extra repository secret is required.

Version Bump Checklist

For a patch bump, for example 1.1.3 to 1.1.4:

version=1.1.4

Update:

  • Cargo.toml: package.version
  • Cargo.lock: run cargo build --release (without --locked) to regenerate
  • VERSION
  • CHANGELOG.md

Then verify:

cargo fmt --check
cargo test --locked
cargo clippy --locked -- -D warnings
cargo build --release --locked

Create Release

git status --short
git commit -am "chore: release v${version}"
git tag -a "v${version}" -m "gosleep-timer v${version}"
git push origin main
git push origin "v${version}"

The .gitea/workflows/release.yaml workflow will:

  1. Re-run release gates: cargo fmt --check, cargo test --locked, cargo clippy --locked -- -D warnings, and YAML lint.
  2. Build target/release/gosleep-timer.
  3. Copy binary as gosleep-timer-<version>-linux-amd64.
  4. Generate a SHA-256 checksum.
  5. Create a Gitea release.
  6. Upload the binary and checksum as release assets.

The workflow is idempotent: if the release already exists, it reuses it and replaces assets with matching names. If any lint or test step fails, the build and release job will not run.

Manual Asset Build

If Actions are unavailable:

version="$(cat VERSION)"
cargo build --release --locked
mkdir -p dist
binary="gosleep-timer-${version}-linux-amd64"
cp target/release/gosleep-timer "dist/${binary}"
cd dist
sha256sum "${binary}" > "${binary}.sha256"