Currently, when I want to update one of my hackage packages, I go through this process.
Naturally, each of these steps I only want to do if the previous step is successful.
I presume other people have a similar workflow, is there something that does all these steps? I could probably do (1), (3) and (4) in a script, although (2) I'm not so sure about (that is, checking the results of travis-ci) but as this seems to be a common problem I was wondering if someone has already solved it so I don't reinvent the wheel.
Travis CI docs make this pretty simple these days, you can follow their docs for deployment to set up conditional deployment (i.e., when a git tag is made). You can configure it to deploy straight to hackage as well, per travis docs.
Here's a semi-complete example config:
deploy:
provider: hackage
username: "Hackage User Name"
password: "Hackage Password"
on:
tags: true
Note per Travis docs, "it is recommended to encrypt password. Assuming you have the Travis CI command line client installed, you can do it like this: travis encrypt --add deploy.password
". See their docs on encryption for more help on that, since unfortunately I haven't done that part before.
This changes your workflow just a little bit; the end result would be:
So if you can run any tests locally, be reasonably sure that all is well, you can tag a release and push and Travis will do the rest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With