CI-driven Package Release Automation
Haskellers share a lot of code in various libraries, published on Hackage. Packages declare dependencies, and the bounds of compatible versions of such dependencies. However, when a new version of a dependency outside said bounds is released (e.g., a new version of base
), it takes quite some effort to create an publish a new release of such package, now compatible with said dependency version:
- Make changes to the Cabal project description
- Push to VCS
- Test whether things don’t break
- Create and publish a release
- Update package version
- Tag
- sdist
- Publish sdist to Hackage
- Potentially publish documentation to Hackage
For “simple” packages, especially those who are not receiving a lot of code changes (anymore), this can be quite tedious. Luckily, it is possible to automate a lot of this, e.g., using GitHub Actions.
I think it’d be good to have a standardized setup package maintainers (using GitHub/GitHub Actions) could apply to their repository so a lot of this is automated, and packages automatically share best-practices in release automation.
Since Dependabot doesn’t support Haskell, some automation around cabal outdated
and a cron-like job could be used. Similarly, GHC versions and testing against compatible versions could be based on GHCup metadata.
In the end, once a package author has “finished” working on some package and enabled the automation, the maintainer should ideally no longer need any manual interactions to keep the package compatible with new versions of dependencies, including getting such newer versions published on Hackage and whatnot. As long as CI passes, of course.
I’m aware the above likely doesn’t (or shouldn’t?) involve a lot of Haskell code, but it would bring a lot of value to the Haskell ecosystem.