Automate releases from tags
Releases were manual and had drifted: v0.2.0 and v0.2.1 were tagged but never
released, so the releases page jumped v0.1.0 -> v0.3.0 and hid the fix for the
incident that took every app down.
Pushing a v* tag now runs the full suite and cuts a GitHub release whose body is
the matching CHANGELOG.md section -- one source of truth for release notes, so
there is no second place for them to be wrong.
The workflow refuses to publish when:
- the tests, ruff, or bash -n fail (a tagged commit is what people install; it
must be at least as good as main)
- the tag does not match the VERSION= declared by every script
- CHANGELOG.md has no section for the tag, or the section is empty
That version check is not theoretical: VERSION= had drifted to three different
values across install.sh / uninstall.sh / recover.sh / apply.sh and nothing
noticed until this release. tests/test_release_notes.py now asserts the scripts
agree with each other and with the newest CHANGELOG entry, so the drift cannot
come back.
workflow_dispatch takes an existing tag, so releases can be backfilled for tags
that were pushed before this existed.
106 tests, ruff and shellcheck clean.
This commit is contained in:
@@ -83,6 +83,14 @@
|
||||
`.zfs/snapshot/<name>-<timestamp>/` path changes every run, which defeats
|
||||
restic's parent detection and forces a full re-scan each time.
|
||||
|
||||
- **Automated releases.** Pushing a `v*` tag runs the full test suite and then
|
||||
cuts a GitHub release whose body is the matching `CHANGELOG.md` section — so
|
||||
release notes have exactly one source of truth. The workflow refuses to publish
|
||||
if the tests fail, if the tag does not match the `VERSION=` declared by every
|
||||
script, or if the CHANGELOG has no section for it. (`VERSION=` had silently
|
||||
drifted to three different values across the scripts, and nothing noticed.)
|
||||
`workflow_dispatch` can create a release for an already-existing tag.
|
||||
|
||||
- **CI** (GitHub Actions): shellcheck + `bash -n` on every script, ruff, and
|
||||
pytest on Python 3.11/3.12/3.13. Includes tests that `compile()` the
|
||||
`*_BLOCK` strings — they are Python source appended to live middlewared
|
||||
|
||||
Reference in New Issue
Block a user