From b30371bed7de4123d496dbe6fcd4874f1f6027ba Mon Sep 17 00:00:00 2001 From: Laurence Warne Date: Thu, 25 Aug 2022 12:34:46 +0100 Subject: [PATCH] Make ci publish exe --- .github/workflows/ci.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3a4ac7..975527d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,31 @@ on: [push] name: build jobs: - runhaskell: - name: Build Executable + runs-on: ubuntu-latest # or macOS-latest, or windows-latest steps: - uses: actions/checkout@v3 - - uses: haskell/actions/setup@v2 + - name: Setup Haskell + uses: haskell/actions/setup@v2 with: ghc-version: '8.8.4' # Exact version of ghc to use # cabal-version: 'latest'. Omitted, but defaults to 'latest' enable-stack: true stack-version: 'latest' - - run: stack build + + - name: Build Executable + id: build-exec + run: | + stack build + echo "::set-output name=bin-path::$(stack path --local-install-root)" + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ steps.build-exec.outputs.bin-path }}/bin/reddit-emacs-tips-n-tricks-exe + #files: .stack-work/dist/x86_64-linux/Cabal-${{ cabal-version }}/build/reddit-emacs-tips-n-tricks-exe/reddit-emacs-tips-n-tricks-exe + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}