Release Drafter
Create or update a draft release for the geni project using the gh CLI.
Changelog
Location: CHANGELOG (root of repository, no file extension)
Format
Use these sections under ## Unreleased:
### Breaking Changes- API changes requiring migration### Added- New features### Changed- Changes to existing functionality### Fixed- Bug fixes### Removed- Removed features
If no subsections exist, simple bullet points are acceptable.
Rules
- Before adding entries, read the full
## Unreleasedsection to see which subsections already exist - New entries ALWAYS go under
## Unreleasedsection - Append to existing subsections (e.g.,
### Fixed), do not create duplicates - NEVER modify already-released version sections
- Each version section is immutable once released
Attribution
- Internal changes (from issues):
Fixed foo bar ([#123](https://github.com/emilpriver/geni/issues/123)) - External contributions:
Added feature X ([#456](https://github.com/emilpriver/geni/pull/456) by [@username](https://github.com/username))
Releasing
Single package: The project has one version defined in Cargo.toml.
Version semantics (no major releases):
patch: Bug fixes and new featuresminor: API breaking changes
Steps
Check for existing draft release
gh release list --limit 10 --json tagName,isDraft,nameLook for any release where
isDraftistrue.Determine the new version
Read the current version from
Cargo.toml:grep '^version = ' Cargo.tomlGet the latest tag:
git describe --tags --abbrev=0Calculate the new version:
- If
## Unreleasedcontains### Breaking Changes, bump minor version - Otherwise, bump patch version
- If
Update CHANGELOG for the release
Replace
## Unreleasedwith## [v<new-version>]and add the release date:## [v1.3.2] - 2025-01-15 * Fixed schema dump for PostgreSQL...Add a new empty
## Unreleasedsection at the top:## Unreleased ## [v1.3.2] - 2025-01-15 ...Update Cargo.toml version
Update the version in
Cargo.tomlto match the new release version.Create or update draft release
If no draft exists, create a new one:
gh release create v<new-version> --draft --title "v<new-version>" --notes "<release-notes>"If a draft already exists, update it:
gh release edit v<existing-draft-tag> --draft --title "v<new-version>" --notes "<release-notes>"For release notes, use the content from the
## [v<new-version>]section of the CHANGELOG.Verify the release
gh release view v<new-version> --json tagName,isDraft,name,body,url
Quick Commands Reference
# List releases (find drafts)
gh release list --limit 10 --json tagName,isDraft
# Create new draft release
gh release create v1.3.2 --draft --title "v1.3.2" --notes "Release notes here"
# Update existing draft release
gh release edit v1.3.1 --draft --title "v1.3.2" --notes "Updated notes"
# View release details
gh release view v1.3.2
# Delete a draft (if needed)
gh release delete v1.3.2 --yes
Source: emilpriver/geni — distributed by TomeVault.