Skip to content

CI and releases

Simdrom edited this page Nov 27, 2026 · 1 revision

CI and releases

Workflows

Workflow When What it does
CI (ci.yml) Every pull request; pushes to develop (not for changes only to .md, licences or .gitignore); weekly on Monday; by hand; called by the release The checks below
Release (release.yml) By hand, from develop Runs CI, packages, tests the setup, publishes
Old caches (cache-cleanup.yml) After each CI run of a push to develop Deletes caches a newer Cargo.lock has replaced

All actions are pinned by commit, the default token is read-only, and each job asks only for the permissions it needs.

The CI jobs

Job Runs on When What it checks
Format Ubuntu PRs, pushes cargo fmt --all --check
Clippy and tests Windows PRs, pushes cargo clippy -D warnings and cargo test --workspace
What's new Ubuntu PRs, pushes Warns when feat or fix commits leave whats-new.txt untouched
Minimum Rust version Windows Pushes, by hand cargo check with the rust-version of Cargo.toml
Release build Windows Pushes, by hand, the release Builds kuro.exe, its licences and the setup, and uploads them as an artifact for 14 days
Advisories, licences and sources Ubuntu Always, also weekly cargo deny check
Workflow lint Ubuntu PRs, pushes zizmor and actionlint over .github

A newer push to the same pull request cancels the older run. The weekly run only checks advisories, which appear without any change in the repository.

Speed

  • Release build runs beside the checks, not after them. Nothing ships with a red check: the release's Package job waits for every check.
  • In a release, the build is a matrix of three runners: the setup that ships, and the same program as two other versions (0.0.9 and a newer one), only to test moving between them. They build side by side.
  • cargo about gathers the licences while the program compiles.
  • Debug info is off in CI, incremental builds are off, and Swatinem/rust-cache keeps one cache per job. Only develop saves caches; pull requests read them.
  • Old caches keeps only the newest cache of each job, so the repository stays well under GitHub's 10 GB.

Branch rules

The rules live as JSON in .github/rulesets/; apply.sh creates the ones the repository lacks.

Ruleset Applies to Rule
main and develop: no deletion, no rewriting main, develop No deletion, no force-push
main: only the owner and the release main Only the owner and the release's deploy key may update it
develop: checks pass before merging develop Format, Clippy and tests, and Workflow lint must pass; the owner and the deploy key may bypass
version tags never change v* tags No deletion, no update

The required checks are names of jobs in ci.yml: renaming a job means changing the ruleset too. Pull requests can use auto-merge: it merges once the required checks pass.

Publishing a release

The version is the one in the root Cargo.toml; on develop it is always the next release.

  1. Make sure whats-new.txt has lines under that version, in every language.
  2. Run Actions › Release from develop. With dry run on (the default), it builds and packages everything and publishes nothing.
  3. Run it again with dry run off.

What the release does:

flowchart LR
  P[Check and describe] --> CI[CI, with installer tests]
  CI --> K[Package]
  K --> T[Tag and publish]
  T --> N[Next version on develop]
Loading
Job What it does
Check and describe Runs from develop only; reads the version; refuses if its tag exists on another commit, if main has commits develop lacks, or if the deploy key is missing. Builds the notes: the English of whats-new.txt, then the commits (git cliff).
CI The whole CI, building the two extra setups too
Package Zip and setup; installs, updates, goes back and uninstalls on the runner (packaging/windows/test.ps1); SHA256SUMS
Tag and publish Moves main and pushes the tag in one atomic push, then publishes the GitHub release with the files and notes
Next version on develop Moves develop to the next minor version and opens an empty section in whats-new.txt

Nothing is pushed until everything has been built and tested. A retry of the same commit is harmless.

What the release needs

Name Kind Purpose
RELEASE_DEPLOY_KEY Secret A write deploy key: pushes to main and develop, which the workflow's own token may not do for workflow files
KURO_ANILIST_CLIENT_ID, KURO_MAL_CLIENT_ID, KURO_GOOGLE_CLIENT_ID Variables Public client IDs built into the program
KURO_GOOGLE_CLIENT_SECRET Secret Google's desktop-app secret

Hotfixes

main only moves through the release. The local guard allows a push to main with KURO_ALLOW_MAIN=1 for an emergency, and the repository owner may bypass the ruleset.

Clone this wiki locally