ci: automate releases with semantic-release#6
Merged
Conversation
Replace the manual AI-assisted release flow with semantic-release on push to main. Conventional-commit types drive the major.minor.patch bump (fix/perf -> patch, feat/enhance -> minor, breaking -> major; chore/docs/ci/ build/refactor/style/test -> no release). release.yml is now path-aware: the version job analyzes commits and pushes a vX.Y.Z tag, then exactly one publish job runs based on what changed since the previous tag - a fast tag-only GitHub release for custom_components/-only changes (HACS bundles from the tag), or the full frontend + firmware (all boards) + flash-tool build via GoReleaser otherwise. semantic-release only tags; the publish job owns the GitHub release, so there is no double-publish. Adds .releaserc.json, rewrites RELEASE_PROCESS.md (incl. a one-time semver seed-tag migration note, since the historical two-part tags are not valid semver), and updates the CLAUDE.md release section. workflow_dispatch is kept on release.yml/release-ha.yml as manual fallbacks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Automates the release flow by switching from manually dispatched/tagged releases to an on-push-to-main pipeline driven by semantic-release (Conventional Commits), with documentation updates to reflect the new process.
Changes:
- Adds
.releaserc.jsonto define commit-type → semver bump rules and release note sections. - Rewrites
.github/workflows/release.ymlto (1) determine/tag versions via semantic-release and (2) publish via an HA-only or full-build path depending on changed files. - Updates
RELEASE_PROCESS.mdandCLAUDE.mdto document the automated process, manual fallbacks, and the one-time semver seed-tag migration.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
RELEASE_PROCESS.md |
Replaces manual release instructions with semantic-release-driven automation and migration notes. |
CLAUDE.md |
Updates the repo guide’s release section to match the new automated workflow. |
.releaserc.json |
Introduces semantic-release rules for version bumps and generated release notes. |
.github/workflows/release.yml |
Implements the automated release pipeline (version/tag + conditional publish jobs). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+50
to
+52
| - name: Find previous tag | ||
| id: prev | ||
| run: echo "tag=$(git describe --tags --abbrev=0 --match 'v*' 2>/dev/null || echo '')" >> "$GITHUB_OUTPUT" |
Comment on lines
+121
to
+123
| gh release create "$TAG" \ | ||
| --title "$TAG" \ | ||
| --notes-file /tmp/release/release_notes.md |
Comment on lines
+54
to
+61
| - name: Semantic release (analyze + tag) | ||
| id: semantic | ||
| uses: cycjimmy/semantic-release-action@v4 | ||
| with: | ||
| extra_plugins: | | ||
| conventional-changelog-conventionalcommits@7 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Merges currently create no tag/release — releases are fully manual (
release.ymlworkflow_dispatch, version + notes hand-written via the opencode prompt inRELEASE_PROCESS.md). This automates it with semantic-release on push tomain, as discussed re: renjfk/OpenNeato#132 (the lidar fix merged with no release).What
.releaserc.json— Conventional Commits preset.fix:/perf:→patch,feat:/enhance:→minor, breaking→major;chore/docs/ci/build/refactor/style/test→no release.release.ymlrewritten, path-aware:version(Ubuntu): semantic-release analyzes commits, pushes avX.Y.Ztag, generates notes. No-op when nothing releasable landed.release-ha(Ubuntu): runs when onlycustom_components/changed → fast tag + GitHub release, no build (HACS bundles from the tag).release-full(macOS): runs otherwise → frontend + firmware (all boards) + flash tool via GoReleaser.cycjimmy/semantic-release-actionis a Docker action (Linux-only), hence the job split.RELEASE_PROCESS.mdrewritten;CLAUDE.mdrelease section updated.workflow_dispatchretained onrelease.yml/release-ha.ymlas manual fallbacks.semantic-release only recognizes valid semver tags. The current tags are two-part (
v1.9,v1.11) — invalid semver — so without a seed it would restart numbering belowv1.11. One-time fix (documented inRELEASE_PROCESS.md):After that: next
feat/enhance→v1.12.0, nextfix→v1.11.1, breaking →v2.0.0.Note: merging this PR is a
ci:change, so it correctly cuts no release on its own.Notes
major.minor.patchsemver (wasmajor.minorno-patch) — per your go-ahead to use regular semantic-release.🤖 Generated with Claude Code