[ci] Name release runs after the version or dev tag they build - #18110
Conversation
A workflow run name is fixed when the run starts and can only use the github, inputs and vars contexts, so it cannot read the version file or today's date. Move the nightly cron into its own workflow that works out the dated dev tag and starts the release workflow with it, and name the run after that tag. Release runs keep showing just the version number.
|
👋 Hi there! This PR modifies 2 file(s) with codeowners. @esphome/core - As codeowner(s) of the affected files, your review would be appreciated! 🙏 Note: Automatic review request may have failed, but you're still welcome to review. |
There was a problem hiding this comment.
Pull request overview
This PR improves GitHub Actions usability for releases by naming release workflow runs after the version/tag they publish, and introduces a dedicated nightly workflow to compute the dated dev tag and dispatch the release workflow with that tag.
Changes:
- Add a
run-nameto the release workflow to surface the published tag/version in the Actions run list. - Add a
workflow_dispatchinput (tag) so the release workflow can be run with an explicit tag (used by nightly dispatch). - Split the nightly cron into a new workflow that computes the dated dev tag and triggers
release.ymlviaworkflow_dispatch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/release.yml | Adds run-name and an input tag, and updates tag selection logic to prefer the provided tag. |
| .github/workflows/release-nightly.yml | New scheduled workflow that computes the dated dev tag and triggers the release workflow with it. |
Suppressed comments (1)
.github/workflows/release.yml:37
- This env assignment uses
${{ inputs.tag }}, but theinputscontext is not available when the workflow is triggered by thereleaseevent (and can error with "Unrecognized named-value: 'inputs'"). Usegithub.event.inputs.tagso release-triggered runs don't break.
env:
INPUT_TAG: ${{ inputs.tag }}
|
|
There was a problem hiding this comment.
Warning
Important issues found.
- Explicit
taginput bypasses the-<branch>suffix, letting a branch build publish overlatest/stable/dev
Works on every trigger the workflow has, so there is no doubt about the run name on a release-triggered run.
|
|
There was a problem hiding this comment.
Warning
Important issues found.
- Explicit
taginput bypasses the-<branch>suffix, letting a branch build publish overlatest/stable/dev
The tag input was used as given, so a build started from a branch with an explicit tag lost the branch name that keeps it out of the release channels, and could publish over the dev, beta, latest and stable images.
PR Review — [ci] Name release runs after the version or dev tag they buildThe blocking issue from the last round is fixed — merge-ready with three non-blocking notes. Specific things done well:
Remaining points, all non-blocking:
✅ Resolved since last review (1)Previously-flagged issues verified fixed
🟢 Suggestions
1. [Pre-Existing Issue] Release tag and prerelease flag are still interpolated straight into the shell body
|
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
What does this implement/fix?
Gives the release workflow a
run-name, so the Actions list shows which version each run is publishing instead of the workflow name for every entry. Production and beta releases are named after the release tag (just the version number, e.g.2026.8.0or2026.9.0b1), and nightly dev builds are named after the dated dev tag they build, e.g.2026.8.0-dev20260806.A workflow run name is fixed when the run is created and can only reference the
github,inputsandvarscontexts. There is no date function, no way to read the version out ofesphome/const.py, and no API to rename a run afterwards, so the dev tag cannot be worked out by the run name itself. The nightly cron therefore moves into a small new workflow that reads the version, appends today's UTC date, and starts the release workflow with that tag as an input. The release workflow uses the input for both the run name and the tag it builds, so the title always matches what was published.The tag is still worked out inside the release workflow when no input is given, so a manual run (including one on a branch, which keeps the
-<branch>suffix and branch-build behaviour) works exactly as before. Those runs are namedManual build (<branch>).The new workflow needs
actions: writeto start the release workflow.GITHUB_TOKENis explicitly allowed to triggerworkflow_dispatchruns.Types of changes
Related issue or feature (if applicable):
Pull request in esphome.io with documentation (if applicable):
Pull request in developers.esphome.io with developer documentation (if applicable):
Test Environment
Example entry for
config.yaml:# Example config.yamlChecklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: