Skip to content

chore(ci): release-please + release-build + ESLint enforcement#284

Open
TheDave94 wants to merge 1 commit into
TheRealSimon42:mainfrom
TheDave94:chore/release-please-and-eslint
Open

chore(ci): release-please + release-build + ESLint enforcement#284
TheDave94 wants to merge 1 commit into
TheRealSimon42:mainfrom
TheDave94:chore/release-please-and-eslint

Conversation

@TheDave94
Copy link
Copy Markdown

Summary

Three small CI additions, all independent of each other:

1. `release-please.yml` — automated version + changelog

googleapis/release-please-action maintains a permanent "Release PR" on main that:

  • bumps `package.json`'s version based on conventional commits since the last release (`fix:` → patch, `feat:` → minor, `feat!:` / `BREAKING CHANGE:` → major)
  • updates `CHANGELOG.md` with the grouped commits

When you merge that PR, release-please creates the git tag and a GitHub Release with the changelog as the body. No more manual version bumps or hand-written changelogs.

Your existing commit style (the grouped PRs all use `feat:`/`fix:`/`chore:` prefixes) is already conventional-commits-compatible, so this works out of the box.

2. `release-build.yml` — build dist on release

Listens for `release.published`, checks out the tag, runs `npm ci && npm run build`, zips `dist/`, and attaches the zip as `simon42-dashboard-strategy.zip` to the GitHub Release. Also has a `workflow_dispatch` trigger so a broken build can be re-run without re-tagging.

Scope note: this PR doesn't switch `hacs.json` to `zip_release: true` — HACS continues to read `dist/` from the repo at the tag (you keep committing dist/ manually before merging release PRs, same as today). The attached zip is a download-convenience artifact. A follow-up could flip `hacs.json` to make the zip the source of truth and eliminate the manual dist commit entirely; left out here to keep the change backward-compatible.

3. `validate.yml` — ESLint job

Adds a `lint` job that runs `npm run lint` (ESLint over `src/**/*.ts`). Catches the same class of issues Codacy does, runs deterministically on every PR, no noisy third-party-rule false positives.

Verified: ESLint on current upstream/main source is clean (0 errors, 1 warning) — this job will pass immediately on merge.

Test plan

  • release-please workflow file syntactically valid (lint when merged)
  • After merge: release-please opens its first Release PR within minutes of the next push to main
  • After merging a Release PR: tag + GH Release appear; release-build job runs; zip asset attached
  • `lint` job runs on each PR and blocks merge when ESLint reports errors

AI-drafted under human supervision by @TheDave94. Tested live on Home Assistant — fully when the relevant hardware is available, otherwise only along the code paths that don't require an actual sensor of that type.

Three CI additions:

1. .github/workflows/release-please.yml — googleapis/release-please-action
   maintains a permanent "Release PR" on main that bumps the version and
   updates CHANGELOG.md based on conventional commits (feat:/fix:/feat!:).
   Merging it creates the git tag + GitHub Release. No more manual version
   bumps or hand-written changelog entries.

2. .github/workflows/release-build.yml — listens for release.published,
   checks out the tag, runs `npm ci && npm run build`, zips dist/, and
   attaches the zip to the GitHub Release as
   `simon42-dashboard-strategy.zip`. Includes a workflow_dispatch trigger
   so a release can be re-built without a new tag (e.g. if the build was
   broken at release time).

3. .github/workflows/validate.yml — adds a `lint` job that runs
   `npm run lint` (eslint over src/**/*.ts). Catches regressions earlier
   than Codacy and without Codacy's noise (yesterday's incident with
   Biome/Qwik false positives on a Node script).

For now hacs.json is unchanged — HACS continues to serve dist/ from the
repo at the tag, and the maintainer continues to commit dist/ manually
before merging a release PR. The release-build workflow's zip is a
download-convenience artifact. Future work could flip hacs.json to
zip_release: true to make the zip the source of truth, fully removing
the manual dist commit; left out of this PR to keep the change small and
backward-compatible.
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

TheDave94 pushed a commit to TheDave94/oriel-dashboard that referenced this pull request May 20, 2026
Brings into main the remaining open PRs that weren't part of the prior
consolidation (bb43b04):

Improvement PRs (8 — real content):
- TheRealSimon42#277 chore(ci): translation lint guard
- TheRealSimon42#278 test: section-builder + entity-filter unit tests + snapshots
- TheRealSimon42#279 feat(rooms): auto-detect humidifier/valve/water_heater
- TheRealSimon42#280 feat(editor): derive target_section dropdown from section meta
- TheRealSimon42#281 fix(areas): auto-hide section + audit test
- TheRealSimon42#282 feat(editor): wire show_window_contacts_in_rooms + show_door_contacts_in_rooms
- TheRealSimon42#283 feat: custom_sections — user-declared sections without forking
- TheRealSimon42#284 chore(ci): release-please + release-build + ESLint enforcement

Grouped PRs (7 — content already in main via bb43b04 consolidation;
recorded with `-s ours` so the merges land in history without
duplicate/regressive edits):
- TheRealSimon42#270 grouped/optional-overview-sections
- TheRealSimon42#271 grouped/live-overview-badges
- TheRealSimon42#272 grouped/battery-view-improvements
- TheRealSimon42#273 grouped/room-view-features
- TheRealSimon42#274 grouped/section-meta-security
- TheRealSimon42#275 grouped/covers-weather
- TheRealSimon42#276 grouped/persons-overview-tweaks

CI fixes uncovered during merge:
- Bump Node 20 → 22 in validate.yml + release-build.yml (ESLint 10 requires Node 22+)
- Load eslint-plugin-security (rules off) so source-level Codacy
  disable directives resolve cleanly
- Drop unused PropertyValues import in StrategyEditor.ts

Version 1.3.4-thedave-r2 → 1.4.0-thedave (minor bump: feat: custom_sections,
auto-detect humidifier/valve, editor coverage, release automation).

Dist rebuilt + tests + ESLint pass (0 errors, 0 warnings).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@TheDave94 TheDave94 closed this May 20, 2026
@TheDave94 TheDave94 deleted the chore/release-please-and-eslint branch May 20, 2026 22:45
@TheDave94 TheDave94 restored the chore/release-please-and-eslint branch May 21, 2026 08:56
@TheDave94 TheDave94 reopened this May 21, 2026
@TheDave94
Copy link
Copy Markdown
Author

TheDave94 commented May 21, 2026

My main focus has shifted to a downstream project (Oriel Dashboard) — built on what simon42 established, taken in its own direction — but the work in this PR was always meant for simon42 and I'm happy to keep iterating on it here. Address review feedback, split bundled changes into smaller pieces, whatever helps the review. Just ping me.

TheDave94 pushed a commit to TheDave94/oriel-dashboard that referenced this pull request May 21, 2026
Brings into main the remaining open PRs that weren't part of the prior
consolidation (ee9c67c):

Improvement PRs (8 — real content):
- TheRealSimon42#277 chore(ci): translation lint guard
- TheRealSimon42#278 test: section-builder + entity-filter unit tests + snapshots
- TheRealSimon42#279 feat(rooms): auto-detect humidifier/valve/water_heater
- TheRealSimon42#280 feat(editor): derive target_section dropdown from section meta
- TheRealSimon42#281 fix(areas): auto-hide section + audit test
- TheRealSimon42#282 feat(editor): wire show_window_contacts_in_rooms + show_door_contacts_in_rooms
- TheRealSimon42#283 feat: custom_sections — user-declared sections without forking
- TheRealSimon42#284 chore(ci): release-please + release-build + ESLint enforcement

Grouped PRs (7 — content already in main via ee9c67c consolidation;
recorded with `-s ours` so the merges land in history without
duplicate/regressive edits):
- TheRealSimon42#270 grouped/optional-overview-sections
- TheRealSimon42#271 grouped/live-overview-badges
- TheRealSimon42#272 grouped/battery-view-improvements
- TheRealSimon42#273 grouped/room-view-features
- TheRealSimon42#274 grouped/section-meta-security
- TheRealSimon42#275 grouped/covers-weather
- TheRealSimon42#276 grouped/persons-overview-tweaks

CI fixes uncovered during merge:
- Bump Node 20 → 22 in validate.yml + release-build.yml (ESLint 10 requires Node 22+)
- Load eslint-plugin-security (rules off) so source-level Codacy
  disable directives resolve cleanly
- Drop unused PropertyValues import in StrategyEditor.ts

Version 1.3.4-thedave-r2 → 1.4.0-thedave (minor bump: feat: custom_sections,
auto-detect humidifier/valve, editor coverage, release automation).

Dist rebuilt + tests + ESLint pass (0 errors, 0 warnings).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@TheDave94 TheDave94 closed this May 22, 2026
@TheDave94 TheDave94 deleted the chore/release-please-and-eslint branch May 22, 2026 05:55
@TheDave94 TheDave94 restored the chore/release-please-and-eslint branch May 23, 2026 20:46
@TheDave94 TheDave94 reopened this May 23, 2026
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.

1 participant