From 53a4e8b0b4e2b9e95e730cacc145d84240628336 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Tue, 21 Nov 2023 15:53:08 +0700 Subject: [PATCH] Tag and publish on version bumps --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4a19fb3 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,28 @@ +name: publish + +permissions: + contents: write + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - run: cabal check + + - uses: sol/haskell-autotag@v1 + id: autotag + + - run: cabal sdist + + - uses: haskell-actions/hackage-publish@v1.1 + with: + hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }} + publish: true + if: steps.autotag.outputs.created