Skip to content

Commit

Permalink
create and upload binaries on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwoo authored and alexbiehl committed Nov 3, 2022
1 parent 58039e7 commit ddf98dc
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Main

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ${{ matrix.os }}
matrix:
os:
- ubuntu-latest
- macOS-latest
cabal:
- "3.6.2.0"
ghc:
- "9.2.3"

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Haskell
uses: haskell/actions/[email protected]
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Build
run: cabal install exe:tie --install-method=copy --overwrite-policy=always --installdir=out

- name: Test
run: ./out/tie --help

- name: Prepare archive
run: tar -zcvf ./${{ matrix.os }}.tar.gz -C out tie

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./${{ matrix.os }}.tar.gz
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist-newstyle/
.DS_Store
out/
cabal.project.local*
cabal.project.local*
*.tar.gz

0 comments on commit ddf98dc

Please sign in to comment.