From e1456bf7e6d1244302336b9f344525c3a11987b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= Date: Fri, 20 Oct 2023 12:56:00 +0200 Subject: [PATCH] Publish to hackage directly from GitHub (#21) --- .github/workflows/publish.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..427337d --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,25 @@ +name: publish + +on: + push: + branches: + - main +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: cabal check + + - uses: sol/haskell-autotag@v1 + id: autotag + with: + prefix: v + + - run: cabal sdist + - uses: haskell-actions/hackage-publish@v1.1 + with: + hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }} + publish: true + if: steps.autotag.outputs.created