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