chore: prepare production rust release
ci / rust (push) Successful in 1m1s
ci / lint-yaml (push) Successful in 4s
release / linux-amd64 (push) Successful in 44s

This commit is contained in:
2026-07-03 15:45:22 +02:00
parent d1cc207ce4
commit b681db19f1
52 changed files with 2566 additions and 4077 deletions
+98
View File
@@ -0,0 +1,98 @@
# 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
```bash
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
```
Public clone URL:
```text
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`
- `tar`
- `sha256sum`
- Docker, if using the YAML lint job as written
4. Create a Gitea access token with release write permission.
5. Add it as repository secret `GITEA_TOKEN`.
## Version Bump Checklist
For a patch bump, for example `1.1.1` to `1.1.2`:
```bash
version=1.1.2
```
Update:
- `Cargo.toml`: `package.version`
- `Cargo.lock`: package version, regenerated by Cargo
- `VERSION`
- `CHANGELOG.md`
Then verify:
```bash
cargo fmt --check
cargo test --locked
cargo clippy --locked -- -D warnings
cargo build --release --locked
```
## Create Release
```bash
git status --short
git commit -am "chore: release v1.1.2"
git tag -a v1.1.2 -m "gosleep-timer v1.1.2"
git push origin main
git push origin v1.1.2
```
The `.gitea/workflows/release.yaml` workflow will:
1. Build `target/release/gosleep-timer`.
2. Package `gosleep-timer-<version>-linux-amd64.tar.gz`.
3. Generate a SHA-256 checksum.
4. Create a Gitea release.
5. Upload the archive and checksum as release assets.
## Manual Asset Build
If Actions are unavailable:
```bash
version="$(cat VERSION)"
cargo build --release --locked
mkdir -p dist
cp target/release/gosleep-timer dist/gosleep-timer
tar -C dist -czf "dist/gosleep-timer-${version}-linux-amd64.tar.gz" gosleep-timer
sha256sum "dist/gosleep-timer-${version}-linux-amd64.tar.gz" > "dist/gosleep-timer-${version}-linux-amd64.tar.gz.sha256"
```