1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-25 20:33:34 +03:00
hascard/.github/workflows/build.yml
Steven van den Broek 8a258f913b Fix small things
2021-07-17 11:25:31 +02:00

38 lines
1.3 KiB
YAML

name: build
on: [push]
jobs:
build-macos:
runs-on: macos-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
run: ./.github/scripts/attach-binary.sh
build-ubuntu:
runs-on: ubuntu-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