Revert "Use new stack action" #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
- push | |
- pull_request | |
env: | |
STACK_ENV: CI | |
jobs: | |
build: | |
name: Build, Test & Upload | |
runs-on: ubuntu-latest | |
container: | |
image: haskell:9.4-buster | |
options: --user root | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
*/.stack-work | |
key: ${{ runner.os }} | |
- name: Permissions bug workaround | |
run: "chown -R $(id -un):$(id -gn) ~" | |
- name: Build | |
run: make build | |
- name: Check Formatting | |
run: make format-check | |
- name: Test | |
run: make test | |
- name: Make Artifacts Directory | |
run: mkdir artifacts | |
- name: Copy CLI Artifact | |
run: cp $(stack exec which bridge-cli-exe) ./artifacts | |
- name: Copy Slack Artifact | |
run: cp $(stack exec which bridge-slack-exe) ./artifacts | |
- name: Copy Discord Artifact | |
run: cp $(stack exec which bridge-discord-exe) ./artifacts | |
- name: Tar Artifacts | |
run: tar -cvf artifacts.tar ./artifacts | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: artifacts.tar | |
if: ${{ github.ref == 'refs/heads/main' }} |