Maintaining
For whoever merges pull requests and makes releases: branches, merging, releasing, and the GitHub settings.
For whoever merges pull requests and makes releases. How to contribute is in Contributing.
Branches · Merging a pull request · Releasing · GitHub settings
Branches
mainis the only long-lived branch. Releases are tags on it (v0.1.0), not branches. A fix for an older release is a new release frommain; there are no maintenance branches while the version is 0.x.- Contributors work on a branch in their fork, named after the change (
fix/seam-flip,feat/fabric-presets), and open a pull request intomain. - Maintainers (repository admins) may push straight to
main: the ruleset lets admins bypass it. Anything a second pair of eyes should see still goes through a pull request. - History on
mainstays linear: squash merges for pull requests, rebase (not merge) for local work. Every commit is signed off (Contributing).
Merging a pull request
What the ruleset (.github/rulesets/main.json) requires:
- CI green:
check(make check-ci: everything inmake checkbut the golden drapes, since GitHub’s runners have no GPU) anddco(each commit signed off by its author). - One approving review, given after the last push; every conversation resolved.
- Squash merge only.
What only a person can check:
- The drapes. If the change touches the solver, the mesher, the importer or the shaders,
run
make regresson the branch (gh pr checkout <n>, or fetch the fork’s branch), or check that the author did and explained any re-recorded goldens. - Patents. Anything that joins pieces, places them, measures a pattern or resizes a garment follows Patent warnings (CLAUDE.md, “Patents”).
- Project rules. WebGPU core only, the engine and the UI separate, published methods cited in Algorithms, no telemetry (CONTRIBUTING.md, “Rules for engine changes”; Cloud backend).
- The squash message. The title is the PR’s title in the history’s form
(
type(scope): summary); keep theSigned-off-by:lines GitHub puts in the body. - The changelog. A line under Unreleased in CHANGELOG.md when people will notice the change.
Releasing
Versions are SemVer, one version for the whole repository: the Rust
workspace, the web image and the release. While it’s 0.x, a minor version (0.2.0) may change
anything, a patch (0.1.1) only fixes. A version with a hyphen (0.2.0-rc.1) is a pre-release:
it is published, but latest doesn’t move.
-
On an up-to-date
main, with a clean tree:- set
versionin[workspace.package]of packages/vitryne-engine/Cargo.toml, thencd packages/vitryne-engine && cargo check --workspaceto updateCargo.lock; - re-record what carries the version (files name their generator,
vitryne-format 0.1.0):make examples assets wasm(the skirt golden is written by the wasm build), thencd packages/vitryne-web && SKIRT_UPDATE=1 pnpm exec vitest run src/document/skirt.test.ts; - in CHANGELOG.md, rename
## [Unreleased]to## [0.1.0] - YYYY-MM-DD, add an empty## [Unreleased]above it, and update the links at the bottom ([0.1.0]: https://github.com/H4kken/vitryne/releases/tag/v0.1.0). Check the notes withtools/release/notes.sh 0.1.0.
- set
-
make check(the drapes included, which CI can’t run). -
Commit and tag:
git commit -s -am "release: 0.1.0" git tag -a v0.1.0 -m "Vitryne 0.1.0" git push origin main v0.1.0 -
The tag starts .github/workflows/release.yml (about 20 minutes; Actions tab). It fails before publishing anything if the tag and
Cargo.tomldisagree, or CHANGELOG.md has no section for the version. Then it:- runs
make check-ci, which builds the editor; - pushes
ghcr.io/h4kken/vitryne-web:0.1.0,:0.1and:latest(linux/amd64 and linux/arm64); - creates the GitHub release with the changelog section as notes, plus
vitryne-web-0.1.0.tar.gz(the static build), adocker-compose.ymlthat runs 0.1.0,env.example,docker-compose.selfhost.yml(the one with its own backend) withsetup.sh, andSHA256SUMS.
- runs
-
Update the hosted instance (vitryne.app) to the new image, and check it.
If the workflow fails before the image is pushed: fix on main, delete the tag
(git push origin :refs/tags/v0.1.0 && git tag -d v0.1.0), and tag again. After it is pushed,
don’t move the tag: release the fix as the next patch version.
GitHub settings
Once, on github.com/H4kken/vitryne (they live on GitHub, not in the repository):
- Default branch: Settings → General → Default branch:
main. Then deletemaster(an ancestor ofmain, so nothing is lost):git push origin --delete master. - Pull requests (Settings → General): allow squash merging only, default message Pull request title and commit details (keeps the sign-offs); Always suggest updating pull request branches; Automatically delete head branches.
- Rulesets (Settings → Rules → Rulesets → New ruleset → Import a ruleset): import
.github/rulesets/main.json and
.github/rulesets/release-tags.json (only admins
create, move or delete
v*tags). The status checkscheckanddcocan only be picked once CI has run once, so push the workflows first. - Actions (Settings → Actions → General): Require approval for first-time contributors (the default), so a stranger’s pull request doesn’t run until someone has read it.
- Security (Settings → Security): turn on Private vulnerability reporting (SECURITY.md) and Dependabot alerts.
- After the first release: the image’s package (Profile → Packages →
vitryne-web→ Package settings) starts private: make it public, and check it is linked to the repository.