-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (39 loc) · 1.23 KB
/
haskell-ci.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
43
44
45
46
47
48
name: Haskell CI
on:
workflow_dispatch:
permissions:
contents: read
jobs:
on-main-update:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: haskell-actions/[email protected]
with:
ghc-version: '9.6.3'
cabal-version: '3.10.2.1'
- name: Cache
uses: actions/[email protected]
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build package
shell: bash
run: |
cabal update
cabal new-build all
- name: Upload package
env:
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }}
shell: bash
run: |
cabal sdist
cabal upload --username=VladimirSinyakov --password="$HACKAGE_PASSWORD" dist-newstyle/sdist/*.tar.gz
cabal v2-haddock --haddock-for-hackage --enable-doc
cabal upload --documentation --username=VladimirSinyakov --password="$HACKAGE_PASSWORD" dist-newstyle/*-docs.tar.gz