Release Please is this nice tool from Google for automating package releases across languages.
I don’t have any involvement with it but I have trying it in a rust package and really like it. They support about ~20 languages right now including go, rust, node, and python. I think Julia support would be hugely useful if someone is interested – I think it could be used to wrap JuliaRegistrator and automatically trigger new registrations.
Here are some of the features:
Parses and understands entire commit history using Conventional Commits
Conventional commits is a machine-readable standardized format for commits, with things like:
feat: description of feature
fix: description of bug
ci: changes to continuous integration
feat!:
– anything with a!
is a breaking changefeat(gui):
– can also subcategorize commits with parentheses- Or whatever other categories chosen for a repository (it’s configurable)
Because Conventional Commits has specific patterns to indicate breaking changes in individual commits, as well as new features, the version chosen by Release Please is automatically chosen according to SemVer.
Release please works by creating release PRs that you merge. Then other CI tools would run to actually publish the package (release please does not publish packages itself).
Keeps CHANGELOG up-to-date
Because Conventional Commits declares categories of changes, Release Please can add detailed information to the PR, releases, and CHANGELOG using information parsed from the commits. Many PRs have multiple changes across commits, so conventional commits can break this down more than the standard GitHub automatic changelog.
Multiple packages in the same repository
The new version of Release Please which was released earlier this year allows for multiple packages declared in a single schema. For example, here’s what the configuration file for my rust package rip2
looks like:
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "rust",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"include-component-in-tag": false,
"include-v-in-tag": true
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
(The bump-minor-pre-major
just indicates that 0.1.0 → 0.2.0 indicates a breaking change, before the release of 1.0.0)
If there was a Julia option in release please, it could easily allow one to maintain multiple languages for a package in the same repository – similar to how PythonCall.jl has both the Julia PythonCall as well as the Python package juliacall in the same repo. I think having multiple frontends for Julia packages can be nice – not only for opening a package to more users, but also for general adoption of Julia. For example I’ve had good results in the usage of PySR which is just a Python frontend for SymbolicRegression.jl (in addition to acting as a “gateway drug” to Julia for users) – maybe these packages could one day sit in the same repo.
I remember reading that it was a bit tricky to set up continuous releases for multiple interlinked Julia packages in a monorepo so perhaps this tool might help with such situations. It is also aware of which package lives in which directory, so seems able to split the CHANGELOG
and release info based on parsed commits.