Expand description
Releasing without GitHub Actions ([release] mode = "local").
On a repository whose Actions never run, auto-tag.yml and release.yml
never fire, so nothing tags or publishes after the release pull request
merges. In local mode crate::release_watch merges that pull request on
the owner’s approval and then drives the Job defined here, from a clean
detached checkout of the merge commit:
- create and push the
vX.Y.Ztag - never over a tag that exists (tag_stepis the whole decision); - run
[release] commandsone at a time, stopping at the first failure.
- Progress is saved before every step, through the caller’s
save. A step that was started and never finished (a crash, a kill) isJob::interrupted: magi cannot know whethergh release creategot as far as the forge, so it holds for the owner instead of repeating it. - A failure is a hold, not a retry.
run_jobreturns the reason; the watcher records it, raises a notice and asks. Resuming skips the tag and every command that already succeeded. - Environment, not templates. Commands see
MAGI_RELEASE_VERSION,MAGI_RELEASE_TAG,MAGI_RELEASE_COMMITandMAGI_RELEASE_PR; teravars renders the whole config before any release exists, so{{ version }}cannot work. - Only
gitand the commands the operator wrote run; there is no API path.
Structs§
- Env
- Where and how a job runs.
- Job
- One release of one merged pull request, resumable.
- StepLog
- What happened in one step, kept in the record.
Enums§
- TagStep
- What to do about the tag. Pure.
Constants§
- BRANCH_
PREFIX - Head of a release branch name, before the version.
Functions§
- job_dir
- Where a job keeps its worktree and full command output.
- parse_
ls_ remote - The commit
tagpeels to, out ofgit ls-remote --tags <remote> refs/tags/<tag> refs/tags/<tag>^{}. The peeled line wins over the tag object’s own. - run_job
- Drive
jobto the end or to the first failure.Errcarries the reason it stopped; the job itself already says how far it got. Never retries. - tag_
step - Decide the tag step from what was read.
remoteis the commit the remote’s tag peels to (Ok(None): absent), or the reason it could not be read;localis the commit of a local tag of that name. - tail
- Last
maxbytes ofs, on a character boundary. - version_
from_ branch 1.2.3out ofchore/release-v1.2.3.
Type Aliases§
- Save
- Persists the job;
falsemeans it could not be, and nothing may run.