release: automatic game releases after main's green checks
release.yml now releases the game by itself: after every green checks run of a push to main, every hour (a release the cooldown held goes out without another merge) and by hand. tools/release_train.py decides from the pull requests merged since the last published game release: a release when one changed what players run and the last release is 3 hours old, at once for a pull request labelled release-now; skip-release pull requests don't count. RELEASES_PAUSED=1 stops it. Tags vYYYY.MM.DD, then .1, .2 the same UTC day. Linux (ubuntu-22.04) and Windows build on GitHub with Cargo caches, macOS on the Mac mini's runner (MAC_RUNNER=macos-latest sends it to GitHub). Each builds horizon-client, horizon-ctl and horizon-prepare (all three named: --bin selects only the named binaries), checks all three exist, checks their libraries, starts each one, packages with xtask and archives; the Mac also runs the game offscreen for 300 frames on a new world with resources prepared from its own Minecraft. The notes: New (label feature), Fixed (the rest), Known issues (docs/known-issues.md). A hand-started run off main, or with dry_run, builds everything and writes the notes but publishes nothing. docs/release-flow.md describes the flow, the labels, pausing and rolling back; the launcher gets a test that a release turned back into a draft is never offered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1537,6 +1537,29 @@ mod tests {
|
||||
assert_eq!(launcher, ["launcher-v9.0.0"]);
|
||||
}
|
||||
|
||||
/// Rolling a release back (`gh release edit <tag> --draft`, docs/release-flow.md) makes the
|
||||
/// previous one the newest again: it is what `install latest` and the update check offer.
|
||||
#[test]
|
||||
fn withdrawn_release_is_never_offered() {
|
||||
let asset = ASSET.unwrap_or("horizon-linux-x86_64.tar.gz");
|
||||
let list = serde_json::json!([
|
||||
{"tag_name": "v2026.10.15.1", "draft": true, "assets": [{"name": asset, "browser_download_url": "bad", "size": 1}]},
|
||||
{"tag_name": "v2026.10.15", "assets": [{"name": asset, "browser_download_url": "good", "size": 1}]},
|
||||
{"tag_name": "v2026.10.14", "assets": [{"name": asset, "browser_download_url": "old", "size": 1}]},
|
||||
]);
|
||||
let releases = parse_releases(&list, Some(asset), is_game_tag);
|
||||
assert!(releases.iter().all(|r| r.tag != "v2026.10.15.1"));
|
||||
assert_eq!(latest(&releases).map(|r| r.tag.as_str()), Some("v2026.10.15"));
|
||||
let offered = |installed: &[&str]| {
|
||||
let installed: Vec<String> = installed.iter().map(|t| t.to_string()).collect();
|
||||
horizon_update(&releases, &installed).map(|r| r.tag)
|
||||
};
|
||||
assert_eq!(offered(&["v2026.10.14"]), Some("v2026.10.15".into()));
|
||||
assert_eq!(offered(&[]), Some("v2026.10.15".into()));
|
||||
// Who installed the withdrawn one is not told to "update" to an older version.
|
||||
assert_eq!(offered(&["v2026.10.15.1", "v2026.10.14"]), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn versions_compare_by_number() {
|
||||
assert_eq!(compare_versions("v2026.10.13", "v2026.10.12"), Greater);
|
||||
|
||||
Reference in New Issue
Block a user