-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1015 Bytes
/
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
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: '9.8.2'
enable-stack: true
stack-version: 'latest'
- name: Use system ghc
run: |
stack config set install-ghc false --global
stack config set system-ghc true --global
- name: Cache ~/.stack
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('slash-bot.cabal') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Build dependencies
run: stack build --only-dependencies
- name: Build
run: stack build --copy-bins --local-bin-path dist
- uses: actions/upload-artifact@v4
with:
name: slash-bot
path: dist/slash-bot