bump version 0.2.1.0 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cabal/packages | |
~/.cabal/store | |
dist-newstyle | |
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Setup Haskell | |
uses: haskell/actions/setup@v1 | |
with: | |
ghc-version: 8.10 | |
cabal-version: 3.6 | |
- name: Publish package | |
run: | | |
cabal sdist && cabal haddock --enable-documentation --haddock-for-hackage | |
tar_file="$(cabal sdist | grep foreign)" | |
doc_file="$(cabal haddock --enable-documentation --haddock-for-hackage|grep 'foreign.*docs.tar.gz')" | |
echo $tar_file | |
echo $doc_file | |
# Cabal doesn't support auth token for uploading, see: | |
# https://github.com/haskell/cabal/issues/6738 | |
cabal upload -u '${{ secrets.HACKAGE_USERNAME }}' -p '${{ secrets.HACKAGE_PASSWORD }}' --publish $tar_file | |
cabal upload -u '${{ secrets.HACKAGE_USERNAME }}' -p '${{ secrets.HACKAGE_PASSWORD }}' --publish --doc $doc_file |