ci: standardize release process#10
Merged
Merged
Conversation
Add scripts/release.sh for version bumps, changelog updates, tagging, and GitHub Release creation via CI. Enforce changelog checks on version PRs.
There was a problem hiding this comment.
Review
Blocking Issues
scripts/release.shupdate_changelogis broken in both branches:- Empty
## [Unreleased]branch (lines 135–145): The replacement string includes a literal## [Unreleased]at both ends, producing two## [Unreleased]headings in the output. This will fire on the very nextrelease.sh prepareagainst the currentCHANGELOG.md. - Populated
## [Unreleased]branch (lines 127–134):text.split("\n\n", 2)assumes the preamble is two\n\n-separated paragraphs, but the standard Keep a Changelog header in this PR has three. The new version section gets inserted between paragraphs 2 and 3 of the header, burying"The format is based on..."under the release notes. This is the documented release flow (RELEASING.mdstep 1: "Add user-facing notes under## [Unreleased]"), so it will trigger on the first real use.
- Empty
Action Required
- Replace the brittle
split("\n\n", 2)logic with insertion before the first## [X.Y.Z]heading (see inline suggestions onscripts/release.sh). Both branches can share the same anchor-and-insert strategy. - Worth a quick end-to-end smoke test of
./scripts/release.sh prepare patchagainst the currentCHANGELOG.md(empty Unreleased) and against a copy with notes under Unreleased, to confirm the output is well-formed before merging.
Avoid duplicate [Unreleased] headings and keep the preamble intact when preparing releases. Add unit tests and harden release workflow output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
All three prior threads resolved: changelog updater preserves a single ## [Unreleased] heading in both empty and populated cases, the fragile split("\n\n", 2) is gone, and get_version/bump_version now run after the base-branch checkout. Tests in tests/test_update_changelog.py cover both unreleased scenarios.
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.
Summary
Test plan