-
Notifications
You must be signed in to change notification settings - Fork 103
42 lines (34 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: publish
permissions:
contents: write
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cabal check --ignore=missing-upper-bounds
- uses: sol/haskell-autotag@v1
id: autotag
with:
prefix: null
- run: cabal sdist
- uses: haskell-actions/[email protected]
with:
hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }}
publish: true
if: steps.autotag.outputs.created
- name: publish binaries
run: |
cabal update
cabal build --disable-tests --disable-benchmarks --disable-documentation
binary=hpack
asset="${binary}_linux.gz"
cat "$(cabal list-bin $binary)" | gzip > "$asset"
gh release create ${{ steps.autotag.outputs.name }} --title ${{ steps.autotag.outputs.name }} --verify-tag "$asset"
env:
GH_TOKEN: ${{ github.token }}
if: steps.autotag.outputs.created