Skip to content

Commit

Permalink
ci: Fix .github/workflows/upload-binaries.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kmyk committed Jul 28, 2021
1 parent ae2d5f8 commit 8851aad
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,31 @@ jobs:
run: stack --system-ghc build --ghc-options=-Werror

- name: Set extension to .exe on Windows
run: echo "::set-env name=EXT::.exe"
if: matrix.os == 'windows-latest'
id: get_ext
run: |
if [ ${{ matrix.os }} == windows-latest ]; then
ext=.exe
fi
echo "::set-output name=ext::$ext"
shell: bash

- name: Get binary path
id: get_binary_path
run: |
echo "::set-env name=BINARY_PATH::$(stack --system-ghc path --local-install-root)/bin/jikka${{ env.EXT }}"
echo "::set-output name=binary_path::$(stack --system-ghc path --local-install-root)/bin/jikka${{ steps.get_ext.outputs.ext }}"
shell: bash

- name: Compress binary
uses: svenstaro/[email protected]
with:
file: ${{ env.BINARY_PATH }}
file: ${{ steps.get_binary_path.outputs.binary_path }}

- name: Upload Release Asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.BINARY_PATH }}
asset_name: jikka-${{ github.event.release.tag_name }}-${{ runner.os }}${{ env.EXT }}
asset_path: ${{ steps.get_binary_path.outputs.binary_path }}
asset_name: jikka-${{ github.event.release.tag_name }}-${{ runner.os }}${{ steps.get_ext.outputs.ext }}
asset_content_type: application/octet-stream

0 comments on commit 8851aad

Please sign in to comment.