diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 92c3fbc..6fd87bb 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -81,18 +81,17 @@ jobs: - name: Build documentation run: cabal haddock all - # # Skip on PRs. - #- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - # name: Create new git tag if .cabal version is bumped - # uses: sol/haskell-autotag@v1 - # id: autotag - - #- name: Create tarball - # run: cabal sdist - - #- uses: haskell-actions/hackage-publish@v1.1 - # with: - # # http://hackage.haskell.org/users/account-management - # hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }} - # publish: true - # if: steps.autotag.outputs.created + - name: Create new git tag, if merge to master and .cabal version is bumped + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + uses: sol/haskell-autotag@v1 + id: autotag + + - name: Create tarball + run: cabal sdist + + - uses: haskell-actions/hackage-publish@v1.1 + with: + # http://hackage.haskell.org/users/account-management + hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }} + publish: true + if: steps.autotag.outputs.created