From e7ee710e195bd43a50a2f6ba50863f5acbde8eb2 Mon Sep 17 00:00:00 2001 From: Hiromi ISHII Date: Thu, 28 Dec 2023 00:53:09 +0900 Subject: [PATCH] ci: releases --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8ab084b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release +on: + push: + tags: + - "v[0-9]*" + +jobs: + hackage-release: + if: > + github.event_name == 'push' + && startsWith(github.ref, 'refs/tags/') + environment: hackage + name: Release to Hackage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: haskell/actions/setup@v2 + with: + cabal-version: 3.10.1.0 + enable-stack: false + - name: Cabal Check + run: cabal check + - name: Create tarball + run: cabal sdist + - uses: haskell-actions/hackage-publish@v1 + with: + hackageToken: ${{ secrets.HACKAGE_ACCESS_TOKEN }} + packagesPath: dist-newstyle/sdist + publish: false