-
Notifications
You must be signed in to change notification settings - Fork 9
31 lines (31 loc) · 918 Bytes
/
build.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
name: build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set tag environment
run: if [[ "$GITHUB_REF" == refs/tags/* ]]; then echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV; else echo "not a release build"; fi
- name: Install ghr
run: ./.github/scripts/install-ghr.sh
- name: Install stack
run: ./.github/scripts/install-stack.sh
- run: stack setup
- run: stack build
- run: stack test
- name: Attach binary to release, if this is a release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.github/scripts/attach-binary.sh