Skip to content

Run Release Drafter action as last step of CI#264

Merged
frenck merged 2 commits intohassio-addons:mainfrom
lmagyar:pr-fix-rel-drafter
Feb 26, 2026
Merged

Run Release Drafter action as last step of CI#264
frenck merged 2 commits intohassio-addons:mainfrom
lmagyar:pr-fix-rel-drafter

Conversation

@lmagyar
Copy link
Copy Markdown
Contributor

@lmagyar lmagyar commented Feb 6, 2026

Proposed Changes

Github tends to trigger the workflow run before their database behind their GraphQL API finishes processing the event that triggered the workflow run. And rel. drafter uses the GraphQL API. Eg. I had to re-run this WF run manually to get the triggering PR into the drafted release: https://github.com/hassio-addons/app-tailscale/actions/runs/21766534501

If the last PR is a breaking change, this can have serious consequencies.

We can add an eg. 15s delay to the rel.drafter workflow or move it to the end of the CI workflow, I suggest the later.

Maybe this should be done in 3 steps:

  • add it to the CI WF-s
  • delete all the rel.drafter workflows in the add-ons
  • delete rel.drafter WF here

Related Issues

release-drafter/release-drafter#871

Summary by CodeRabbit

  • Chores
    • Release drafts are now automatically generated on pushes to the default branch via CI workflows.
    • Drafting runs only after CI lint checks complete, ensuring releases reflect a verified code state.
    • Legacy release-drafting configuration has been consolidated into the main CI flow for streamlined release automation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 6, 2026

Walkthrough

Consolidates Release Drafter logic by removing the standalone .github/workflows/release-drafter.yaml and adding an update_release_draft job to .github/workflows/app-ci.yaml and .github/workflows/workflows-ci.yaml; the new jobs run on pushes to the repository default branch after their respective build/lint steps and invoke the Release Drafter action with GITHUB_TOKEN.

Changes

Cohort / File(s) Summary
App CI workflow
.github/workflows/app-ci.yaml
Added update_release_draft job that runs on pushes to the default branch after build, invoking the Release Drafter action with GITHUB_TOKEN.
Workflows CI
.github/workflows/workflows-ci.yaml
Added update_release_draft job that runs on pushes to the default branch after lint jobs, with permissions and a Release Drafter step using a pinned action.
Removed standalone workflow
.github/workflows/release-drafter.yaml
Deleted the dedicated Release Drafter workflow; its job was merged into the CI workflows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

bugfix

Poem

🐰 I hopped through CI with gentle pace,
Merged the drafter into its place,
One less file, one tidy trail,
Drafts now bloom along the main branch trail. 🌷📋

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving Release Drafter to run as the last CI step to resolve timing issues with the GitHub GraphQL API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/app-ci.yaml:
- Around line 228-238: The update_release_draft job currently runs Release
Drafter but lacks the job-level permission to create releases; add a job-level
permissions block under the update_release_draft job with contents: write so the
release-drafter/release-drafter step can create draft releases, and also update
the caller workflow (addon-ci.yaml) to grant contents: write at workflow or job
level so the intersected permissions allow write access; target the
update_release_draft job and the caller workflow's permissions settings when
making the change.

In @.github/workflows/workflows-ci.yaml:
- Around line 74-87: The update_release_draft job currently runs with
workflow-level permissions set to contents: read, causing Release Drafter to
fail; update the job definition for update_release_draft to include a job-level
permissions block that grants contents: write (so the
release-drafter/release-drafter action can create/update draft releases), e.g.
add a permissions: section under the update_release_draft job and set contents:
write to override the workflow-level read-only setting for that job.

Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh ran into it a few times. I lack a better solution. Let's go with this one 👍

Thanks, @lmagyar!

../Frenck

                       

Blogging my personal ramblings at frenck.dev

@frenck frenck added the enhancement Enhancement of the code, not introducing new features. label Feb 26, 2026
@frenck frenck merged commit bf24a85 into hassio-addons:main Feb 26, 2026
7 of 8 checks passed
@lmagyar
Copy link
Copy Markdown
Contributor Author

lmagyar commented Feb 26, 2026

Wait, wait!

We should:

  • modify addon-ci.yaml also
  • delete all the rel.drafter workflows in the add-ons!!!!!

@frenck
Copy link
Copy Markdown
Member

frenck commented Feb 26, 2026

delete all the rel.drafter workflows in the add-ons!!!!!

Pinning solves that, every change is causing a PR against the other repos (that migrated to the new workflow, the others are on hold until that happened).

modify addon-ci.yaml also

Good point, we can do that, and just ship another release 👍

../Frenck

                       

Blogging my personal ramblings at frenck.dev

@lmagyar
Copy link
Copy Markdown
Contributor Author

lmagyar commented Feb 26, 2026

modify addon-ci.yaml also

Good point, we can do that, and just ship another release 👍

addons-ci.yaml: uses: ./.github/workflows/app-ci.yaml

So nothing to do. :)

@frenck
Copy link
Copy Markdown
Member

frenck commented Feb 26, 2026

Even better :)

@lmagyar lmagyar deleted the pr-fix-rel-drafter branch February 26, 2026 21:32
@lmagyar
Copy link
Copy Markdown
Contributor Author

lmagyar commented Feb 26, 2026

Still something is strange.

The workflows-ci.yaml, modified in this PR, runs fine during CI, runs the rel. drafter, but without a proper .github/release-drafter.yml file checked into this repo???

In my fork it fails, because there is no .github/release-drafter.yml, it's true, but there is no file in this upstream repo either, and it runs here, what's going on???

@einschmidt
Copy link
Copy Markdown

In my fork it fails, because there is no .github/release-drafter.yml, it's true, but there is no file in this upstream repo either, and it runs here, what's going on???

Having a dedicated repo called .github is the same as having a folder .github in your repository.
hassio-addons has this repository here: https://github.com/hassio-addons/.github

From the release-drafter readme:

Release Drafter also supports Probot Config, if you want to store your configuration files in a central repository. This allows you to share configurations between projects, and create a organization-wide configuration file by creating a repository named .github with the file .github/release-drafter.yml.

lmagyar added a commit to hassio-addons/app-tailscale that referenced this pull request Feb 27, 2026
In hassio-addons/workflows#264 it was moved to the end of app-ci.yaml.
@lmagyar
Copy link
Copy Markdown
Contributor Author

lmagyar commented Feb 27, 2026

@einschmidt Wow, thank you, I had no clue about this.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Enhancement of the code, not introducing new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants