b5314806

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".

Total

29s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 1s 15s 15s 17s 0s
Build 16s 0s 1s 17s 0s
Deploy 17s 12s 12s 29s 0s
Suite 0s 30s 29s 29s 0s

Timeline

Config Eval Build Deploy
0s10s20s