Skip to content

GHA Consider upload package candidates to hackage using github actions #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jneira opened this issue Jan 11, 2021 · 6 comments
Closed

Comments

@jneira
Copy link

jneira commented Jan 11, 2021

  • This is correlated with Support Travis’s deploy feature #36 (upload packages to hackage using travis)
    • As discussed there, it is safer to upload only candidates
  • Afaik there is no github action to do it (if anybody knows there is one in the wild please link it!)
    • So as first step we should create a github action to do it
  • Ideally it should support multipackage project layouts (like haskell-language-server 🙂 )
  • It could be triggered by git tags or using a convention in the git commit message
@phadej
Copy link
Collaborator

phadej commented Jan 11, 2021

At the moment this is not actionable issue. As I don't need this feature (and won't use it), i'm tempted to close this issue until someone clearly promises (and starts) to work on it. (I'm also sceptical of the usefulness).

Storiging sdists as artifacts could be useful though.

@jneira
Copy link
Author

jneira commented Jan 11, 2021

Thanks for the feedback.

I'm also sceptical of the usefulness

Well, we are about to upload up to 11 packages from hls and it supposes quite maintaners work, so automate the more possible can help to agilize the development process.

As I don't need this feature (and won't use it), i'm tempted to close this issue until someone clearly promises (and starts) to work on it.

I can't promise nothing but i want try to create that github action (that can be used directly in our repo of course). No experience about creating github actions so not sure if i will be able to finish. 😟
So feel free to close it, no problem, only wanted to know if anybody could find useful such feature and/or had started to work in something similar.

@phadej
Copy link
Collaborator

phadej commented Jan 11, 2021

Well, we are about to upload up to 11 packages from hls and it supposes quite maintaners work, so automate the more possible can help to agilize the development process.

What is wrong with having a single repository (or some way to have single project) and

git clean -fdx
cabal sdist all
cabal upload dist-newstyle/sdist/*.tar.gz

@phadej phadej closed this as completed Jan 11, 2021
@jneira
Copy link
Author

jneira commented Jan 11, 2021

Thanks for the suggestion, i would like to run a cabal check (that cant take any target afaik, you have to cd into each subpackage) and cabal haddock before to check everything is ok (maybe i am overlooking it?). And only upload packages that effectively have changed and we want to upload explicitly (i suppose cabal upload will fail if there is a previous package uploaded with the same version?)

@phadej
Copy link
Collaborator

phadej commented Jan 11, 2021

you can cabal haddock all or particular targets.

I also opened an haskell/cabal#7242 (I thought I did that, but couldn't find old issue). The problem is that currently check functionality wants to change workdir etc, so there is some refactoring to be done, so it's not a mess when generalized. Something which could be in cabal-install-3.6 though.

@jneira
Copy link
Author

jneira commented Jan 11, 2021

Thanks for opening the issue.
Only want to mention that there exists already a github action to upload to hackage (even definitely): https://github.com/haskell-actions/hackage-publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants