forked from simmsb/calamity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
66 lines (62 loc) · 1.43 KB
/
.gitlab-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
stages:
- build
- publish
- docs
variables:
DOCKER_DRIVER: overlay2
STACK_ROOT: ${CI_PROJECT_DIR}/.stack
build-backend:
stage: build
image: ghcr.io/simmsb/haskell:8.10.4
cache:
paths:
- ${STACK_ROOT}
- .stack-work
- .cabal
script:
- stack
--stack-root ${STACK_ROOT}
build
hackage:
extends: build-backend
interruptible: false
stage: publish
script:
- mkdir -p ${STACK_ROOT}/upload &&
echo "{\"username\":\"${HACKAGE_USERNAME}\",\"password\":\"${HACKAGE_PASSWORD}\"}"
> ${STACK_ROOT}/upload/credentials.json
- stack
--stack-root ${STACK_ROOT}
sdist
- stack
--stack-root ${STACK_ROOT}
upload calamity
- stack
--stack-root ${STACK_ROOT}
upload calamity-commands
only:
- tags
docs:
extends: build-backend
stage: docs
script:
- cabal new-update
- cabal new-haddock
--haddock-for-hackage calamity
- cabal upload
-d
-u "${HACKAGE_USERNAME}"
-p "${HACKAGE_PASSWORD}"
"dist-newstyle/$(cabal info calamity/ | head -n 1 | grep -oP "(?<=\\* )\S+")-docs.tar.gz"
--publish
- cabal new-haddock
--haddock-for-hackage calamity-commands
- cabal upload
-d
-u "${HACKAGE_USERNAME}"
-p "${HACKAGE_PASSWORD}"
"dist-newstyle/$(cabal info calamity-commands/ | head -n 1 | grep -oP "(?<=\\* )\S+")-docs.tar.gz"
--publish
only:
- tags
- web