Skip to content

Commit

Permalink
Merge pull request #39 from stevana/fix-automated-release
Browse files Browse the repository at this point in the history
Try to fix CI so it only publishes to Hackage on merges to master.
  • Loading branch information
stevana committed Jan 16, 2024
2 parents 58b09b7 + 0cceb40 commit 3748220
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/main.yaml
Expand Up @@ -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

0 comments on commit 3748220

Please sign in to comment.