Adopt ready-made project template CI and release standards - #361
Open
jesserockz wants to merge 9 commits into
Open
Adopt ready-made project template CI and release standards#361jesserockz wants to merge 9 commits into
jesserockz wants to merge 9 commits into
Conversation
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.
There was a problem hiding this comment.
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 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.
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.
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.Ndraft on every push to main, build.yml uploads firmware assets to the draft, release.yml (manual dispatch,releaseenvironment) patches release notes into the manifests and publishes via the ESPHome GitHub App, and publish.yml uploads to R2 and promotes to production onrelease: published. R2 uploads keep this repo's existingdirectory: "."layout (esp-web-tools/andesphome-web/as top-level directories on firmware.esphome.io).build.yml no longer hardcodes config lists — it discovers
esp-web-tools/<chip>.yamlandesphome-web/<chip>.factory.yamlby convention.pico-2-w.factory.yamlstays 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.gitignoreentry, and adds ESP32-C6 to the bug report chip dropdown.Types of changes
bugfixenhancementbreaking-changedependenciesRelated issue (if applicable):
Checklist
yamllint --strict .passes.If
esphome-webconfigurations were changed:scripts/generate_esphome_web_configs.py(not by hand-editing the generated YAML) and the configs were regenerated withpython3 scripts/generate_esphome_web_configs.py.If a configuration was added or renamed:
esp-web-tools/<chip>.yamloresphome-web/<chip>.factory.yaml— nobuild.ymledits needed.