Skip to content

chore(release): draft the release with the patch record when a vX.Y.Z tag is pushed - #685

Merged
smarcet merged 1 commit into
mainfrom
chore/release-draft-workflow
Dec 2, 2026
Merged

smarcet merged 1 commit into
mainfrom
chore/release-draft-workflow

Conversation

@smarcet

@smarcet smarcet commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

ref: https://app.clickup.com/t/1k5eh578mb6

Summary

Pushing a vX.Y.Z tag on a commit of production now creates a draft release that carries the patch record, as openstackid #209 does for the IdP. summit-api has no GitHub releases today: its tags (the latest is v4.0.56) have no release notes.

Changes

  • .github/workflows/release-draft.yml (new), on a push of a tag vX.Y.Z:
    • on-production: fails unless the tagged commit is on production, the branch releases are tagged from.
    • test: runs push.yml on the tagged commit, as a reusable workflow with the repository secrets.
    • draft: creates the release as a draft with generated notes (grouped by .github/release.yml) and the patch record template, with vX.Y.Z replaced by the tag. The draft is published by hand once its fields are filled in, and the deploy date is added once the release runs in production.
  • .github/workflows/push.yml: adds the workflow_call trigger, and its push trigger now covers branches only. A tag push used to run the suite on its own; now it runs once, inside the release workflow. Branch pushes and the jobs do not change.
  • .github/RELEASE_NOTES_TEMPLATE.md (new): the patch record template (release tag, deploy date, components updated, CVEs and advisories), the same as openstackid's.
  • .github/release.yml (new): groups the generated notes into "Dependency updates" (pull requests labelled dependencies, which Dependabot adds) and "Other changes".

Notes

  • push.yml takes 1.5 to 2 hours (the integration matrix on MySQL), so the draft appears that long after the tag is pushed. Keeping tags out of push.yml avoids running the suite twice for every release.
  • A tag that does not match vX.Y.Z no longer runs the tests.
  • The first automatic draft will be for the next tag. v4.0.56 has no release; it can be drafted by hand with the command in the template.

Tests

  • Both workflows parse as YAML with the intended triggers and jobs. release-draft.yml differs from openstackid's only in the workflow it calls, and the template and release.yml are identical to openstackid's.
  • The sed of the draft step was run locally on the template with a sample tag: every vX.Y.Z is replaced.
  • The generate-notes API for v4.0.56 returns the range v4.0.55...v4.0.56, so the generated notes start at the previous tag even though the repository has no releases yet.
  • The push.yml run on this branch shows that the changed trigger block is valid. The release workflow itself runs only on a tag push.

Summary by CodeRabbit

  • New Features
    • Version tags now trigger validation against the production branch, run the test workflow, and create a draft release with generated notes after tests pass.
    • Release notes group dependency updates separately from other changes.
    • Push checks now run on all branches.
  • Documentation
    • The release template explains how to create a release manually and lists details to include, such as the release tag, production deployment date, updated components, and addressed advisories.

… tag is pushed

Pushing a vX.Y.Z tag on a commit of production runs the tests and creates a
draft release with generated notes and the patch record template, as openstackid
does.

push.yml now runs on branch pushes only and can be called by the release
workflow, so a release tag runs the test suite once.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

A version tag can trigger a workflow that verifies production ancestry, runs tests, and creates a draft release with generated notes. The changes also add release-note categories and a template for release details.

Changes: Draft release workflow

Layer / File(s) Summary
Release-note content and categories
.github/RELEASE_NOTES_TEMPLATE.md, .github/release.yml
The template describes automated and manual release creation and provides fields for release details. The configuration groups dependency updates separately from other changes.
Tag validation, tests, and draft release
.github/workflows/push.yml, .github/workflows/release-draft.yml
The push workflow supports calls from other workflows. For matching version tags, the release workflow checks that the tagged commit is on production, runs the push workflow, and creates a draft release after tests pass.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub tag event
  participant Draft as release-draft.yml
  participant Production as production branch
  participant Push as push.yml
  participant Releases as GitHub Releases
  GitHub->>Draft: Trigger on version tag
  Draft->>Production: Check tagged commit ancestry
  Draft->>Push: Run tests after ancestry check
  Push-->>Draft: Return test result
  Draft->>Releases: Create draft release with generated notes
Loading

Suggested reviewers: romanetar

Merge Risk: Minimal · up to 77ce2

This change adds a draft-release workflow and release-note configuration. Draft releases are published by hand, so the impact of a mistake is low. The first automatic run on the next matching tag will confirm the workflow works as intended.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: a release draft is created when a vX.Y.Z tag is pushed, and it includes the patch-record template. The raw summary and objectives confirm release-draft.yml, the templa…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a release draft is created when a vX.Y.Z tag is pushed, and it includes the patch-record template. The raw summary and objectives confirm release-draft.yml, the template, and the release config. The title is specific and matches the changeset. The 'chore(release):' prefix is a conventional-commit scope, and the title is 83 characters, which is a bit long but still clear.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f523519f-d7fe-4ef9-b55c-f52a62c2bdfd
Commits

Reviewing files that changed from the base of the PR and between d769775 and 77ce29b.

Files selected for processing: 4

  • .github/RELEASE_NOTES_TEMPLATE.md
  • .github/release.yml
  • .github/workflows/push.yml
  • .github/workflows/release-draft.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-685/

This page is automatically updated on each push to this PR.

@smarcet smarcet self-assigned this Dec 1, 2026
@smarcet
smarcet requested a balanced review from Copilot December 1, 2026 20:36

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified for the draft-release automation changes.

No open issues 🎉

What changed in this PR

Adds draft-release automation for vX.Y.Z tags on production commits, connecting the existing test workflow with generated release notes and a patch record for manual completion.

Changes:

  • Verifies the tagged commit is on production and runs tests before creating a draft release.
  • Makes the push test workflow reusable and limits its direct push trigger to branches, avoiding duplicate test runs for release tags.
  • Adds dependency-based release-note grouping and a patch record template covering deployment date, updated components, and security advisories.
File Description
.github/​workflows/​release-draft.yml Validates production ancestry, runs tests, and creates the draft release.
.github/​workflows/​push.yml Enables reusable calls and restricts push-triggered tests to branches.
.github/​release.yml Groups generated notes into dependency updates and other changes.
.github/​RELEASE_NOTES_TEMPLATE.md Defines patch record fields and manual draft-creation instructions.

Review effort: Balanced

@smarcet
smarcet merged commit be93582 into main Dec 2, 2026
40 checks passed
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.

2 participants