Release a new version of the Julia package
Register a new version with JuliaRegistrator and auto-generated release notes. TagBot will create the git tag and GitHub release after the registry PR merges.
Important: Do NOT create the git tag manually. TagBot must create it so that it also creates the GitHub release. If the tag already exists, TagBot will skip the release.
Instructions
Determine the version to release:
- If
$ARGUMENTSis provided, use it as the version (e.g.,v0.3.0). Ensure it has avprefix. - If no argument is given, read the
versionfield fromProject.tomland use that.
- If
Pre-flight checks:
- Run
git statusto ensure the working tree is clean. Abort if there are uncommitted changes. - Run
git tagto verify the version tag does not already exist. Abort if it does — TagBot may have already released it, or a manual tag will block TagBot from creating the release. - Verify that the
versionfield inProject.tomlmatches the version being released (without thevprefix). Warn the user if they don't match and ask how to proceed.
- Run
Generate release notes by running
git log <previous-tag>..HEAD --onelineand categorising commits:- Breaking changes — commits with
!:orrefactor!: - Bug fixes — commits starting with
fix: - Improvements — everything else worth noting (
feat:,docs:,ci:,build:,refactor:,perf:) - Skip
style:andchore:commits unless they are significant. - Write the notes in concise bullet points referencing function names where relevant.
- Breaking changes — commits with
Show the user the version and the draft release notes. Ask for confirmation before proceeding.
Invoke JuliaRegistrator by commenting on HEAD:
gh api repos/{owner}/{repo}/commits/{sha}/comments -f body='@JuliaRegistrator register Release notes: <release notes here>'Report the result: Confirm the registrator was invoked and link to the commit comment. Remind the user that:
- The registry PR typically auto-merges after 3 days (shorter for patch/minor bumps of existing packages).
- TagBot will automatically create the git tag and GitHub release (with the release notes) after the registry PR merges.
Source: ferrolho/ModernRoboticsBook.jl — distributed by TomeVault.