File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
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
+ - uses : actions/cache@v2
17
+ with :
18
+ path : |
19
+ ~/.cabal/packages
20
+ ~/.cabal/store
21
+ dist-newstyle
22
+ key : ${{ runner.os }}-${{ hashFiles('**/*.cabal') }}
23
+ restore-keys : |
24
+ ${{ runner.os }}-
25
+
26
+ - name : Setup Haskell
27
+ uses : haskell/actions/setup@v1
28
+ with :
29
+ ghc-version : 8.10
30
+ cabal-version : 3.4
31
+
32
+ - name : Install zookeeper-dev on ubuntu
33
+ run : sudo apt-get update && sudo apt-get install -y libzookeeper-mt-dev
34
+
35
+ - name : Publish package
36
+ run : |
37
+ cabal sdist && cabal haddock --enable-documentation --haddock-for-hackage
38
+
39
+ tar_file=$(cabal sdist | grep zoovisitor)
40
+ doc_file=$(cabal haddock --enable-documentation --haddock-for-hackage|grep 'zoovisitor.*docs.tar.gz')
41
+
42
+ echo $tar_file
43
+ echo $doc_file
44
+
45
+ cabal upload -u "${{ secrets.HACKAGE_USERNAME }}" -p "${{ secrets.HACKAGE_PASSWORD }}" --publish $tar_file
46
+ cabal upload -u "${{ secrets.HACKAGE_USERNAME }}" -p "${{ secrets.HACKAGE_PASSWORD }}" --publush --doc $doc_file
You can’t perform that action at this time.
0 commit comments