Skip to content

Commit 2cff0c6

Browse files
committed
Add publishing step to CI
1 parent 5c2a75a commit 2cff0c6

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/pipeline.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: pipeline
33
on: [push, pull_request]
44

55
jobs:
6-
cabal:
6+
check:
77
name: pipeline
88
runs-on: ubuntu-latest
99

@@ -69,3 +69,13 @@ jobs:
6969

7070
- name: Check cabal file
7171
run: cabal check
72+
73+
- name: Document
74+
if: startsWith(github.ref, 'refs/tags/v')
75+
run: cabal haddock --builddir="$dir" --haddock-for-hackage --enable-documentation
76+
77+
- name: Publish
78+
if: startsWith(github.ref, 'refs/tags/v')
79+
run: |
80+
cabal upload -t ${{ secrets.HACKAGE_TOKEN }}
81+
cabal upload -d $dir/*-docs.tar.gz -t ${{ secrets.HACKAGE_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
1+
build/
2+
cache/
3+
packagedb/
4+
*.tar.gz
25

36
### Created by https://www.gitignore.io
47
### Haskell ###

0 commit comments

Comments
 (0)