2021-07-16 21:08:12 +03:00
|
|
|
name: build
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
2021-07-16 23:23:47 +03:00
|
|
|
- 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
|
2021-07-16 21:08:12 +03:00
|
|
|
- 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
|
|
|
|
run: ./.github/scripts/attach-binary.sh
|