Skip to content

ci: refactor release workflows, split pre-release handling and update release-drafter version#288

Merged
snovak7 merged 1 commit into
mainfrom
287-update-release-drafter
Jun 10, 2026
Merged

ci: refactor release workflows, split pre-release handling and update release-drafter version#288
snovak7 merged 1 commit into
mainfrom
287-update-release-drafter

Conversation

@snovak7

@snovak7 snovak7 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Closes #287

Summary by Sourcery

Refactor the release-drafter workflow to separate pre-release and full release handling while tightening its triggers and configuration.

CI:

  • Split release-drafter workflow into dedicated pre-release and release draft jobs with explicit prerelease settings and updated triggers.
  • Upgrade release-drafter action to version v7.3.1 and simplify workflow inputs by removing manual dispatch configuration.

Summary by CodeRabbit

  • Chores
    • Updated release management workflow configuration to use a newer version of the release-drafter action and simplified pre-release handling.

@snovak7 snovak7 self-assigned this Jun 10, 2026
@snovak7 snovak7 added the area/dev-tooling Development Tooling label Jun 10, 2026
@snovak7 snovak7 linked an issue Jun 10, 2026 that may be closed by this pull request
@sourcery-ai

sourcery-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Refactors the release-drafter GitHub Actions workflow to separate pre-release and release drafting behavior, trigger on standard pull request events (including label changes), and pins release-drafter to version v7.3.1 with explicit prerelease configuration instead of workflow-dispatch inputs.

Flow diagram for updated release-drafter CI workflow

flowchart TD
  subgraph Triggers
    PR["pull_request\n(opened/edited/reopened/synchronize/labeled/unlabeled)"]
    PushMain["push to main"]
  end

  subgraph Jobs
    PreReleaseJob["job: update_prerelease_draft\nuses release-drafter@v7.3.1\nprerelease: true (rc)"]
    ReleaseJob["job: update_release_draft\nuses release-drafter@v7.3.1\nprerelease: false"]
  end

  PR --> PreReleaseJob
  PushMain --> ReleaseJob

  subgraph Concurrency
    ConcurrencyGroup["group: pr-<number> or ref\ncancel-in-progress for non-main, non-tag"]
  end

  PR -. uses .-> ConcurrencyGroup
  PushMain -. uses .-> ConcurrencyGroup
Loading

File-Level Changes

Change Details Files
Refactor release-drafter workflow to separately handle pre-release and standard release drafts, simplify triggers, and pin the release-drafter action version with explicit prerelease configuration.
  • Change workflow trigger from pull_request_target to pull_request and expand handled PR event types to include labeled and unlabeled events while keeping main branch pushes
  • Remove manual workflow_dispatch interface and all custom inputs controlling release-type, prerelease identifier, and inclusion of prereleases
  • Add a dedicated update_prerelease_draft job that always creates/updates a prerelease draft using release-drafter with prerelease=true and prerelease-identifier set to 'rc'
  • Update the existing update_release_draft job to use release-drafter v7.3.1 and configure it as a non-prerelease draft by setting prerelease=false and clearing prerelease-identifier
  • Pin both jobs to use release-drafter/release-drafter@v7.3.1 instead of the unversioned v7 tag
.github/workflows/release-drafter.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#287 Configure the release workflow so that a regular release draft and a pre-release draft are both created every time the workflow runs.
#287 Update the Release Drafter GitHub Action to a newer version as part of the release workflow changes.

Possibly linked issues

  • Update Release Drafter #287: PR fixes the workflow’s non-working YAML parameters by splitting prerelease/release jobs and updating release-drafter version.
  • Update Release Drafter #287: PR splits workflows into separate release and pre-release drafts and updates release-drafter, matching the issue’s request.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Release Drafter workflow is reconfigured to trigger automatically on pull request events with fixed prerelease behavior. Pull request triggers now include label operations, and the Release Drafter action is upgraded to v7.3.1 with prerelease settings hardcoded instead of accepting manual dispatch inputs.

Changes

Release Drafter Configuration

Layer / File(s) Summary
Workflow trigger configuration
.github/workflows/release-drafter.yml
Pull request event triggers changed from pull_request_target + workflow_dispatch to direct pull_request with specific event types including label add/remove operations.
Release Drafter action and prerelease settings
.github/workflows/release-drafter.yml
Action version upgraded to v7.3.1; prerelease behavior changed from dispatch-input-driven to fixed values (prerelease: false, prerelease-identifier: ''); input-driven logic removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

area/continuous-integration

Poem

🐰 Release notes now flow free,
With pull requests the trigger key,
No manual dispatch in sight,
Drafter v7.3.1 gets it right!
Releases and pre-releases in harmony.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: refactoring release workflows, splitting pre-release handling, and updating the release-drafter version.
Linked Issues check ✅ Passed The PR addresses issue #287 by refactoring the release-drafter workflow to handle pre-release and release creation with explicit configuration and updated triggers.
Out of Scope Changes check ✅ Passed All changes are confined to the release-drafter workflow configuration and are directly related to the stated objectives of splitting pre-release and release handling.
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
  • Commit unit tests in branch 287-update-release-drafter

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.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider adding explicit if: conditions on the two jobs so update_prerelease_draft runs only for pull_request events and update_release_draft only for push to main, to avoid drafting both types on unintended event types.
  • If the intention is to only draft prereleases for certain PRs (e.g., with a specific label), it may be clearer to add an if: condition based on labels rather than triggering on all pull_request events including opened and edited.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider adding explicit `if:` conditions on the two jobs so `update_prerelease_draft` runs only for `pull_request` events and `update_release_draft` only for `push` to `main`, to avoid drafting both types on unintended event types.
- If the intention is to only draft prereleases for certain PRs (e.g., with a specific label), it may be clearer to add an `if:` condition based on labels rather than triggering on all `pull_request` events including `opened` and `edited`.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@snovak7

snovak7 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/release-drafter.yml (1)

21-47: ⚠️ Potential issue | 🟠 Major

Prevent draft overwrites between the pre-release and release jobs in .github/workflows/release-drafter.yml

Release Drafter can target the same “matching” draft release for multiple jobs updating the same repo/branch, so running prerelease: true (prerelease-identifier: rc) and prerelease: false (prerelease-identifier: '') in parallel may cause one job to overwrite the other unless the drafts are uniquely isolated (e.g., separate tag-prefix/config per job). Also, prerelease-identifier: '' is valid/supported for v7.3.1 (empty/omitted identifier is treated as the default behavior).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-drafter.yml around lines 21 - 47, The two Release
Drafter jobs (update_prerelease_draft and update_release_draft) can target the
same draft and overwrite each other; fix by isolating their targets — e.g., add
distinct Release Drafter inputs to each job such as setting different tag-prefix
values (use tag-prefix: rc- for update_prerelease_draft and tag-prefix: '' for
update_release_draft) or point each job to a separate config file (via with:
config-name/config-file) so the action instances (uses:
release-drafter/release-drafter@v7.3.1) create/update different draft releases
instead of colliding.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/release-drafter.yml:
- Around line 21-47: The two Release Drafter jobs (update_prerelease_draft and
update_release_draft) can target the same draft and overwrite each other; fix by
isolating their targets — e.g., add distinct Release Drafter inputs to each job
such as setting different tag-prefix values (use tag-prefix: rc- for
update_prerelease_draft and tag-prefix: '' for update_release_draft) or point
each job to a separate config file (via with: config-name/config-file) so the
action instances (uses: release-drafter/release-drafter@v7.3.1) create/update
different draft releases instead of colliding.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f9ab7bf-d91c-44e9-a460-e61fe04c6e10

📥 Commits

Reviewing files that changed from the base of the PR and between bfa872c and b0dfc13.

📒 Files selected for processing (1)
  • .github/workflows/release-drafter.yml

@snovak7
snovak7 merged commit dea81f3 into main Jun 10, 2026
15 of 17 checks passed
@snovak7
snovak7 deleted the 287-update-release-drafter branch June 10, 2026 10:40
@snovak7 snovak7 added the area/continuous-integration Improvements or additions to Continuous Integration label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/continuous-integration Improvements or additions to Continuous Integration area/dev-tooling Development Tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Release Drafter

1 participant