Skip to content

Commit

Permalink
Merge pull request #105 from kmyk/fix-upload-binaries
Browse files Browse the repository at this point in the history
Fix upload-binaries.yml
  • Loading branch information
kmyk authored Jul 28, 2021
2 parents ae2d5f8 + f9afe0a commit 1933aef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 2021-07-28: v5.0.11.1

Uploaded to Hackage
Uploaded to Hackage: <https://hackage.haskell.org/package/Jikka>

## 2021-07-21: v5.0.11.0

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ for developpers:
- [CONTRIBUTING.ja.md](https://github.com/kmyk/Jikka/blob/master/CONTRIBUTING.ja.md) (Japanese translation)
- [docs/DESIGN.md](https://github.com/kmyk/Jikka/blob/master/docs/DESIGN.md) (Japanese)
- [docs/how-it-works.pdf](https://github.com/kmyk/Jikka/blob/master/docs/how-it-works.pdf) (Japanese)
- [Haddock](https://kmyk.github.io/Jikka/)
- [Haddock](https://hackage.haskell.org/package/Jikka)
- [Haddock (master)](https://kmyk.github.io/Jikka/)


## Examples
Expand Down

0 comments on commit 1933aef

Please sign in to comment.