build: add release tagging, version checks and a release script
This repo has no tags and no GitHub releases, and manifest.json has read "1.0.0" since the integration was vendored -- unchanged across 20 commits, including today's breaking reshape of the config flow. HACS falls back to serving the default branch when there are no releases, so every download is indistinguishable from the last and there is no way to tell what is running. - scripts/release.py bumps manifest.json, commits and creates an annotated tag in one step. It refuses a dirty tree, a branch other than main, a main that differs from origin/main, a malformed version and an existing tag. It stops short of pushing, since pushing the tag is what publishes. - .github/workflows/release.yaml triggers on v* tags and refuses to publish when the tag and manifest.json disagree. That mismatch is the failure worth guarding: HACS offers the tag while Home Assistant reports the manifest, so you install "v0.2.0" and the integration page says 0.1.0. It then creates the release with gh (no third-party action). - tests/test_version.py keeps the manifest version parseable by AwesomeVersion (what HACS validates with) and in the shape the release script accepts, so a release never fails on the version string itself. Scheme: 0.x while the config entry shape is still in motion -- it changed twice today -- and 1.0.0 when it settles. Documented in the README. Local: 169 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxJYWgGJtCw13qUHZtG8ki
This commit is contained in:
1 parent
e7fcb1d7a1
commit
4a347369cc
4 files changed
+197
No files matched your search
@@ -171,6 +171,29 @@ pytest tests/ -v
|
||||
The suite is core's `openai_conversation` test suite, ported as a regression net, plus
|
||||
tests for the base-URL behavior this fork adds.
|
||||
|
||||
## Releases
|
||||
|
||||
HACS falls back to serving the default branch when a repository has no releases, so
|
||||
every download looks identical and there is no way to tell what is installed. Tagged
|
||||
releases fix that, and Home Assistant shows `manifest.json`'s version on the
|
||||
integration page.
|
||||
|
||||
Versions are `0.x` while the config entry shape is still changing; `1.0.0` when it
|
||||
settles.
|
||||
|
||||
To cut one:
|
||||
|
||||
```bash
|
||||
python scripts/release.py 0.2.0
|
||||
git push origin main --follow-tags
|
||||
```
|
||||
|
||||
The script bumps `manifest.json`, commits, and creates the annotated tag `v0.2.0`. It
|
||||
deliberately does not push — pushing the tag is what publishes. That triggers
|
||||
[`release.yaml`](.github/workflows/release.yaml), which refuses to publish if the tag
|
||||
and the manifest version disagree (HACS reads the tag, HA reads the manifest; when they
|
||||
drift you install "v0.2.0" and it reports 0.1.0) and then creates the GitHub release.
|
||||
|
||||
## License
|
||||
|
||||
[Apache-2.0](LICENSE), inherited from Home Assistant core. See [NOTICE](NOTICE) for
|
||||
|
||||
Reference in new issue
Block a user