b5314806

Created Started Finished

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Release to Hackage from master, via nix-ci.nix

'nix run .#release-to-hackage' uploads every publishable package whose
version is not on Hackage yet, and nothing else.  That makes it idempotent:
running it on a push that bumped no version does nothing, and re-running
after a partial upload finishes the job.  '--dry-run' prints what it would
upload.

Publishable means the cabal file has a synopsis, which cabal2nix turns into
meta.description.  Hackage rejects a package without one, and the example
and test-suite packages in this repository deliberately have none, so there
is no second list to keep in sync with the package set.

Building the package builds every sdist, so it is a flake package rather
than a bare script: a broken sdist then fails CI on any branch, rather than
during a release.

nix-ci.nix runs it from master only, with HACKAGE_API_KEY from the
repository's secrets.  It also replaces the flake's 'nix-ci' output, which
NixCI ignores entirely once this file exists, so the cachix settings moved
here rather than being silently dropped.

Hackage resets HTTP/2 streams under the burst of requests a repository of
this many packages makes, so the queries go over HTTP/1.1, and a failed
query stops the run rather than being read as "not published yet".