Skip to content

ci: automate releases with semantic-release#6

Merged
Leicas merged 1 commit into
mainfrom
ci/semantic-release
May 30, 2026
Merged

ci: automate releases with semantic-release#6
Leicas merged 1 commit into
mainfrom
ci/semantic-release

Conversation

@Leicas

@Leicas Leicas commented May 30, 2026

Copy link
Copy Markdown
Owner

Why

Merges currently create no tag/release — releases are fully manual (release.yml workflow_dispatch, version + notes hand-written via the opencode prompt in RELEASE_PROCESS.md). This automates it with semantic-release on push to main, 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.yml rewritten, path-aware:
    • version (Ubuntu): semantic-release analyzes commits, pushes a vX.Y.Z tag, generates notes. No-op when nothing releasable landed.
    • release-ha (Ubuntu): runs when only custom_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.
    • semantic-release only tags; the publish job owns the GitHub release → no double-publish. macOS is required for the darwin CGO flash builds, and cycjimmy/semantic-release-action is a Docker action (Linux-only), hence the job split.
  • RELEASE_PROCESS.md rewritten; CLAUDE.md release section updated.
  • workflow_dispatch retained on release.yml/release-ha.yml as manual fallbacks.

⚠️ Required before/after merge: seed a semver tag

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 below v1.11. One-time fix (documented in RELEASE_PROCESS.md):

git tag -a v1.11.0 "$(git rev-list -n1 v1.11)" -m "Seed semver baseline for semantic-release"
git push origin v1.11.0

After that: next feat/enhancev1.12.0, next fixv1.11.1, breaking → v2.0.0.

Note: merging this PR is a ci: change, so it correctly cuts no release on its own.

Notes

  • Adopts 3-part major.minor.patch semver (was major.minor no-patch) — per your go-ahead to use regular semantic-release.
  • Release notes are now generated from commit messages, so changelog quality tracks commit-message quality.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 30, 2026 17:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to define commit-type → semver bump rules and release note sections.
  • Rewrites .github/workflows/release.yml to (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.md and CLAUDE.md to 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 }}
@Leicas Leicas merged commit e18d583 into main May 30, 2026
8 checks passed
@Leicas Leicas deleted the ci/semantic-release branch May 30, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants