Just a note to myself as to the steps I normally follow when releasing a Haskell library to Hackage.
Release steps
-
Create a
release-x.ybranch - Finalize ChangeLog.md
-
Run
nix develop -c cabal haddockand sanity check the haddocks - Commit all changes, and push a release PR.
-
Generated sdist using
cabal sdist(if using flakes, runnix run nixpkgs#cabal-install -- sdist) -
Run
cabal upload [--publish] <path/to/sdist>to upload the sdist. Ignore--publishif you want to preview it first. -
Publish Haddocks manually (optional, if Hackage doesn’t do it automatically)
-
Run
cabal haddock --haddock-for-hackageto generated haddocks for hackage. -
Run
cabal upload -d --publish $PATH_TO_TARBALLto update haddocks on the release.
-
Run
- Squash merge the PR.
- Draft a new release on Github. Copy paste the change log. This will automatically create and push the new git tag.
Post-release
- Increment cabal version in .cabal file
- Plan, as first task, updating of nixpkgs and package dependencies.
Open questions
- Research a tool that automates much of the release process; cf. https://twitter.com/domenkozar/status/1744333116687184030