haskell-flake icon indicating copy to clipboard operation
haskell-flake copied to clipboard

A flake app to upload to Hackage

Open srid opened this issue 3 years ago • 2 comments

Normally I use cabal sdist followed by cabal upload --publish[^cr] in the nix shell to upload a new release to Hackage.

  • Can this be automated in an universal fashion?
  • If so, would it be useful for this module to provide a flake app to do it all?

Then, something like nix run .#hackage-publish -- <package-name> could be used to build a sdist and publish to Hackage automatically. Though it is not clear which exact interface (CLI arguments, for instance) we want to support.

[^cr]: @locallycompact pointed me to this command.

srid avatar Nov 20 '22 19:11 srid

(fyi)

I use this Haskell script based on Domen's releaser library, forking some of the functions. It has a bigger scope:

  • short-circuit for unchanged packages
  • package version bumps in cabal files
  • start editor for final changelog edit
  • committing
  • tagging
  • signing
  • upload
  • docs upload
  • git push, git push --tags

I'd like to better automate the changelog stuff. Something that takes changes from separate files and determines the type of version bump major/minor/patch would be nice, making PRs more self contained without introducing merge conflicts. Also the short-circuiting should happen earlier.

roberth avatar Nov 20 '22 21:11 roberth

It may be best to do this as separate flake-parts module. It can also do other things like resolving symlinks (by copying them to sdist): https://github.com/kowainik/summoner/pull/335/files#diff-245563af9e34754739b12b294f3324c1d42c116ace7ce8735e21dfbc82d8e064R19-R26

srid avatar Mar 13 '23 15:03 srid