Skip to content

ci: make staging the testing layer in front of main - #84

Closed
CanReader wants to merge 2 commits into
stagingfrom
canberk/pensive-knuth-lopgzf
Closed

CanReader wants to merge 2 commits into
stagingfrom
canberk/pensive-knuth-lopgzf

Conversation

@CanReader

@CanReader CanReader commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

What this changes

staging becomes the testing layer in front of main. Every change lands in staging first, and main only takes pull requests from staging once CI passes. The game itself is untouched; only CI configuration and docs change.

  • .github/workflows/branch-policy.yml fails any pull request into main that does not come from this repository's staging branch. It runs on pull_request_target, so a pull request cannot edit the check into passing, and it checks out nothing.
  • CI also runs on pull requests into and pushes to staging. Each push to staging uploads the Windows and Linux Release builds as artifacts, so they can be play-tested before release.
  • .github/rulesets/main.json and staging.json are importable rulesets: pull requests only, CI must pass, no force pushes or deletion; main additionally requires the branch policy check and merge commits.
  • Dependabot opens its updates against staging.
  • CONTRIBUTING.md documents the flow; the pull request template points at staging.
  • engine-update.yml gets issues: write, so the issue it opens when an engine change breaks the game is no longer refused. This is groundwork for the engine pinging SleakCraft on every push, as it already does for SleakEngine-FPP and SleakEngine-Empty.

Why

To keep main safe: changes get tested in staging before they reach main.

How it was verified

  • Builds on Linux
  • Loaded a world and played it
  • Placed and broke blocks
  • Saved, quit, reloaded, and the world was intact
  • Not runtime tested (explain why below)

No game code changes. Checked instead:

  • The branch policy logic against 10 source/target cases, including a fork with its own branch named staging.
  • Both rulesets against GitHub's REST API schema, and every required check name against the real CI job names.
  • actionlint with shellcheck on every workflow.

This pull request is the first real run of the updated CI.

Checklist

None apply: no shader, save format, collision, or event handler changes.

Every change now lands in staging first and reaches main only when
staging is merged into it.

- branch-policy.yml fails any pull request into main that does not come
  from this repository's staging branch. It runs on pull_request_target,
  so a pull request cannot edit the check into passing, and it checks
  out nothing.
- CI also runs on pull requests into and pushes to staging, and each
  push to staging uploads the Release builds so they can be play-tested
  before release.
- .github/rulesets/ holds importable rulesets: main takes pull requests
  only, with merge commits only, once CI and the branch policy pass;
  staging takes pull requests only, once CI passes. Neither branch can
  be force-pushed or deleted.
- Dependabot opens its updates against staging.
- CONTRIBUTING.md documents the flow and the rulesets, and the pull
  request template points at staging.
engine-update.yml opens an issue when an engine change breaks the game,
but its token only had contents: read, so creating the issue would have
been refused. Every run so far has passed, so this never showed. It
matters once the engine pings SleakCraft on every push, as it already
does for SleakEngine-FPP and SleakEngine-Empty.
@CanReader
CanReader force-pushed the canberk/pensive-knuth-lopgzf branch from 2c3c552 to b1ad9cb Compare October 1, 2026 08:44
@CanReader CanReader closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant