-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Fix .github/workflows/upload-binaries.yml
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |