Skip to content

Adopt ready-made project template CI and release standards - #361

Open
jesserockz wants to merge 9 commits into
mainfrom
jesserockz-2026-458
Open

Adopt ready-made project template CI and release standards#361
jesserockz wants to merge 9 commits into
mainfrom
jesserockz-2026-458

Conversation

@jesserockz

@jesserockz jesserockz commented Jul 16, 2026

Copy link
Copy Markdown
Member

What does this implement/fix?

Modernises this repo to the ready-made project template standards. Releases move to the CalVer draft-release flow: release-drafter maintains a YY.M.N draft on every push to main, build.yml uploads firmware assets to the draft, release.yml (manual dispatch, release environment) patches release notes into the manifests and publishes via the ESPHome GitHub App, and publish.yml uploads to R2 and promotes to production on release: published. R2 uploads keep this repo's existing directory: "." layout (esp-web-tools/ and esphome-web/ as top-level directories on firmware.esphome.io).

build.yml no longer hardcodes config lists — it discovers esp-web-tools/<chip>.yaml and esphome-web/<chip>.factory.yaml by convention. pico-2-w.factory.yaml stays excluded (see #351) until ESPHome ≥ 2026.7.0 and an rp2-aware build-action land via a new esphome/workflows pin.

Also brings over the template's PR template, importable rulesets JSON, issue template contact links (org discussions board, fixed copy-paste errors), devcontainer image bump to python:3.13, a defensive .gitignore entry, and adds ESP32-C6 to the bug report chip dropdown.

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — label: bugfix
  • Enhancement (non-breaking change which improves an existing configuration) — label: enhancement
  • Breaking change (fix or change that alters existing behaviour, e.g. renamed entities) — label: breaking-change
  • Dependency update (actions, reusable workflows or ESPHome version) — label: dependencies
  • Other

Related issue (if applicable):

Checklist

  • The configuration compiles and has been tested on a real device where possible.
  • yamllint --strict . passes.

If esphome-web configurations were changed:

  • The change was made in scripts/generate_esphome_web_configs.py (not by hand-editing the generated YAML) and the configs were regenerated with python3 scripts/generate_esphome_web_configs.py.

If a configuration was added or renamed:

  • It follows the naming convention CI discovers automatically: esp-web-tools/<chip>.yaml or esphome-web/<chip>.factory.yaml — no build.yml edits needed.

Move releases to the CalVer draft-release flow (release-drafter on push
to main, assets uploaded to the draft, manual release.yml publish via
the ESPHome GitHub App, publish.yml uploading to R2 on release), let
build.yml discover configs by naming convention instead of hardcoded
lists, and bring over the template's PR template, rulesets, issue
template links and devcontainer updates.
Copilot AI review requested due to automatic review settings July 16, 2026 06:42
Comment thread .github/workflows/build.yml Fixed
Comment thread .github/workflows/build.yml Fixed
Comment thread .github/workflows/publish.yml Fixed
Comment thread .github/workflows/publish.yml Fixed
Comment thread .github/workflows/publish.yml Fixed
Comment thread .github/workflows/publish.yml Fixed

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

This PR aligns the repository with the ESPHome ready-made project template by introducing a CalVer-based draft-release pipeline and modernizing repository contribution/configuration scaffolding.

Changes:

  • Adds a CalVer draft-release flow using Release Drafter, a draft-asset upload build pipeline, a manual publish workflow, and a post-publish R2 upload/promote workflow.
  • Updates build workflow to discover firmware config files by convention (with a temporary pico-2-w exclusion).
  • Imports template-aligned repo hygiene and contributor UX updates (PR template, issue contact links, devcontainer image, rulesets JSON, gitignore).

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.gitignore Ignores .claude/ workspace metadata.
.github/workflows/build.yml Builds firmware on PRs and after Release Drafter runs; discovers configs dynamically; uploads assets to draft releases and cleans draft body warnings.
.github/workflows/publish.yml On release publish, reconstructs expected artifact layout from release assets and uploads/promotes to R2.
.github/workflows/release.yml Manual release publish workflow that patches manifests with final release notes and publishes via GitHub App token.
.github/workflows/release-drafter.yml Maintains a CalVer draft release on each push to main.
.github/rulesets/default-protection.json Adds importable branch protection ruleset definition.
.github/rulesets/block-release-publishing.json Adds importable tag ruleset intended to block direct tag creation/updates (except via bypass actors).
.github/release-drafter.yml Configures Release Drafter categories and the “ASSETS_PENDING” caution banner template.
.github/PULL_REQUEST_TEMPLATE.md Adds template-aligned PR checklist and labeling guidance.
.github/ISSUE_TEMPLATE/config.yml Updates contact links and fixes incorrect “about” copy for related repositories.
.github/ISSUE_TEMPLATE/bug_report.yml Adds ESP32-C6 to the chip dropdown.
.devcontainer/devcontainer.json Updates devcontainer to Python 3.13 image and streamlines JSON formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build.yml Outdated
Comment on lines +44 to +45
esphome_web=$(find esphome-web -name '*.factory.yaml' -print | sort \
| grep -vxF 'esphome-web/pico-2-w.factory.yaml')
Add least-privilege GITHUB_TOKEN permissions to build.yml and
publish.yml (with contents: write only where the draft-release flow
needs it) and use ltrimstr instead of regex sub for the calver tag
prefix in release-drafter.
stale.yml only processes issues, the lint/config-check workflows only
read the repo, release.yml authenticates exclusively with the GitHub
App token, and publish.yml needs contents: read just in the jobs that
download release assets.
actions/create-github-app-token mints a token with all of the app
installation's permissions by default; the release job only needs to
read the draft release, replace its assets and publish it.
An unset stale-pr-message only suppresses the comment; days-before-stale
still applies to PRs, so labelling a 30-day-inactive PR would 403 under
the issues-only token grant. Disable PR processing explicitly with
days-before-pr-stale: -1.
PATCHing a draft release without re-sending tag_name resets its tag to
an untagged-* placeholder, and gh's draft-by-tag resolution proved
unreliable during the 2026-07-17 API degradation. Re-send tag_name/name
on every draft PATCH, skip untagged-* orphans when resolving the draft,
and switch release.yml to download, upload and publish by release id.
Replace the inline release-drafter, release and publish workflows with
thin callers to the shared 2026.7.0 workflows, which encode the
draft-release fixes (untagged-* filtering, id-based asset handling,
tag-derived release URLs). build.yml stays inline because it builds two
grouped firmwares, which the shared wrapper cannot express yet; its
draft jobs are kept byte-for-byte in sync with 2026.7.0 instead.

Bump ESPHome to 2026.7.0, which resolves distinct rp2 variants for the
two Pico boards (RP2040 vs RP2350) and so fixes the output collision
that removed pico-2-w from the build in #351.
The condition only ever mattered inside ready-made-project-template; it
is a no-op here.
release-drafter deprecated categories[*].label / labels; move each
category's label matching under a when: condition.
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.

3 participants