Skip to content

ci: adopt release-please for firmware releases - #130

Merged
jonasniesner merged 1 commit into
ci/release-matrixfrom
ci/release-please
Jul 27, 2026
Merged

ci: adopt release-please for firmware releases#130
jonasniesner merged 1 commit into
ci/release-matrixfrom
ci/release-please

Conversation

@g4bri3lDev

@g4bri3lDev g4bri3lDev commented Jul 27, 2026

Copy link
Copy Markdown
Member

Adopts release-please for this repo, per the #support-forum SemVer thread.

Stacked on #129 (the matrix refactor) — that is its base branch, so review this diff alone. GitHub will retarget it to main once #129 merges.

Releases become: merge conventional commits → review the release PR → merge it → tag, CHANGELOG, build and asset upload all happen automatically.

Tags stay bare

include-v-in-tag: false and include-component-in-tag: false. Both matter — three separate consumers parse these tags:

  • sync-firmware-release.sh on the website compares tags with sort -V to decide if a release is newer, and writes the raw tag into httpdocs/firmware/toolbox/bin/*_full.json as .version, which esp-web-tools compares against the running device.
  • The HA integration reads releases/latest tag_name for installed vs latest, and builds OTA asset filenames from it.

The part that is easy to get wrong

A release created with GITHUB_TOKEN does not emit release: published. All the real work here hangs off that event, so a naive adoption would cut tags that build nothing and attach no assets — and the website's nightly sync would then advertise them.

So release.yml gains a workflow_call trigger and release-please.yml invokes it directly, gated on release_created. The calling job grants contents: write, because a called workflow cannot hold more permissions than its caller. release: published is kept so publishing by hand still builds, and workflow_dispatch gives a recovery path for re-running a failed build against an existing tag.

Also drops release-to-discord.yml

It is not merely unused: it fires on every release and fails every time for want of a DISCORD_WEBHOOK_URL secret — 2.25.1, 2.25.0, 2.24.4, 2.24.2, 2.24.1 are all red. Re-add it later with the secret, chained after the build.

Verified end to end on a fork

fix: commit → release PR 2.25.2 (compare/2.25.1...2.25.2) → merge → bare tag 2.25.2release_createdworkflow_call → 11-target matrix → 23 assets attached.

The decisive evidence is a run that does not exist: the run list showed only event=push and event=pull_request, no event=release at all. Without this wiring, 2.25.2 would have been a published release with zero binaries.

Two bugs were caught by that test and are already fixed here: the caller-permissions startup failure, and package-name causing component-prefixed tags (Firmware-2.26.0) which also made release-please miss the prior release, walk the whole history, and propose a bogus minor bump from feat: commits already shipped in 2.24.

Before merging

Worth also making the PlatformIO CI check required on PRs: the release PR is an ordinary PR, so a compile break would then block the merge and no tag is ever cut.

Releases are cut by merging a release PR: release-please maintains the
version manifest and CHANGELOG.md from conventional commits and creates
the GitHub release, tagged bare (2.26.0 — not v2.26.0, not
Firmware-2.26.0) to match every existing tag, the website's sort -V
freshness check, and the HA integration's OTA asset lookup.

A release created with GITHUB_TOKEN does not emit release:published, so
release.yml gains a workflow_call trigger and release-please.yml invokes
it gated on release_created; the calling job grants contents:write, since
a called workflow cannot hold more permissions than its caller. The
release:published trigger is kept so publishing by hand still builds, and
workflow_dispatch gives a recovery path for re-running a failed build.

Also drops release-to-discord.yml: it has no DISCORD_WEBHOOK_URL secret
and has failed on every release since 2.24.1.
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