mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-12-24 20:14:21 +03:00
Add CI workflow step to publish on Hackage on tag push (#196)
* Barebones `hackage.yml` workflow structure * Removed `hackage.yml` * Added new `release` job and steps for Hackage distribution * Commenting `release` job * Uncommented `release` job and fixed bad syntax * Fixed bad YAML syntax * Removed upload-artifact/download-artifact * Changed version variable to glob expression `*` * Added Haddock generation and upload steps for Hackage
This commit is contained in:
parent
0e4bef339b
commit
f973b0671e
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@ -3,6 +3,8 @@
|
|||||||
# - https://github.com/haskell/time/blob/master/.github/workflows/ci.yml
|
# - https://github.com/haskell/time/blob/master/.github/workflows/ci.yml
|
||||||
# - https://github.com/stackbuilders/stache/blob/master/.github/workflows/ci.yaml
|
# - https://github.com/stackbuilders/stache/blob/master/.github/workflows/ci.yaml
|
||||||
# - https://markkarpov.com/post/github-actions-for-haskell-ci.html
|
# - https://markkarpov.com/post/github-actions-for-haskell-ci.html
|
||||||
|
# - https://github.com/tfausak/strive/blob/main/.github/workflows/ci.yaml
|
||||||
|
# - https://hackage.haskell.org/upload
|
||||||
---
|
---
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
@ -51,3 +53,28 @@ jobs:
|
|||||||
- run: cabal build
|
- run: cabal build
|
||||||
- run: cabal test
|
- run: cabal test
|
||||||
- run: ./script/haddock
|
- run: ./script/haddock
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: build
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Generate package ready for Hackage distribution
|
||||||
|
run: cabal sdist
|
||||||
|
|
||||||
|
- name: Upload package to Hackage
|
||||||
|
run: |
|
||||||
|
cabal upload --publish \
|
||||||
|
--username '${{ secrets.HACKAGE_USERNAME }}' \
|
||||||
|
--password '${{ secrets.HACKAGE_PASSWORD }}' \
|
||||||
|
dist-newstyle/sdist/hapistrano-*.tar.gz
|
||||||
|
|
||||||
|
- name: Generate Haddock docs for Hackage distribution
|
||||||
|
run: cabal v2-haddock --haddock-for-hackage --enable-doc
|
||||||
|
|
||||||
|
- name: Upload Haddock docs to Hackage
|
||||||
|
run: |
|
||||||
|
cabal upload -d --publish \
|
||||||
|
--username '${{ secrets.HACKAGE_USERNAME }}' \
|
||||||
|
--password '${{ secrets.HACKAGE_PASSWORD }}' \
|
||||||
|
dist-newstyle/hapistrano-*-docs.tar.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user