Skip to content

Commit 211ea04

Browse files
committed
add packaging ci
1 parent 7d1cacc commit 211ea04

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: 'recursive'
15+
16+
- name: Setup Haskell
17+
uses: haskell/actions/setup@v1
18+
with:
19+
ghc-version: 8.10
20+
cabal-version: 3.4
21+
22+
- name: Publish package
23+
run: |
24+
tar_file=$(cabal sdist | grep zoovisitor)
25+
doc_file=$(cabal haddock --enable-documentation --haddock-for-hackage|grep 'zoovisitor.*docs.tar.gz')
26+
27+
echo $tar_file
28+
echo $doc_file
29+
30+
cabal upload -u "${{ secrets.HACKAGE_USERNAME }}" -p "${{ secrets.HACKAGE_PASSWORD }}" --publish $tar_file
31+
cabal upload -u "${{ secrets.HACKAGE_USERNAME }}" -p "${{ secrets.HACKAGE_PASSWORD }}" --publush --doc $doc_file

0 commit comments

Comments
 (0)