From 2d738dfde637fc633a7f9548c7d205da9da0d3ab Mon Sep 17 00:00:00 2001 From: Nikolai Kudasov Date: Fri, 2 Feb 2024 20:33:53 +0300 Subject: [PATCH] Add a release workflow (release a candidate on Hackage) --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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 000000000..16a50c696 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + hackage: + name: "Upload a new candidate on Hackage" + runs-on: ubuntu-latest + steps: + - name: 📥 Checkout repository + uses: actions/checkout@v3 + + - name: 🧰 Setup Stack + uses: freckle/stack-action@v4 + with: + fast: false + + - name: 🔨 Generate package dist tarball + run: stack sdist --tar-dir packages/ + + - name: 🚀 Upload on Hackage + uses: haskell-actions/hackage-publish@v1 + with: + hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }} + packagesPath: packages + publish: false