Skip to content

Commit

Permalink
update release process
Browse files Browse the repository at this point in the history
- Fix the build on windows (by running `stack install chime` rather than
  `stack install`, which fails b/c the playground is broken on windows).

- Compress + archive the binary
  • Loading branch information
jeremyschlatter committed Apr 30, 2020
1 parent 2bfb94e commit e114577
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ jobs:
- os: ubuntu-latest
name: linux
ext: ''
archive: '.tar.gz'
- os: macos-latest
name: darwin
ext: ''
archive: '.tar.gz'
- os: windows-latest
name: windows
ext: '.exe'
archive: '.zip'
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -29,14 +32,20 @@ jobs:
run: curl -sSL https://get.haskellstack.org/ | sh
shell: bash
- name: Build binary
run: stack install && cp $(stack path --local-bin)/chime${{ matrix.ext }} .
run: stack install chime && cp $(stack path --local-bin)/chime${{ matrix.ext }} .
shell: bash
- name: zip up the binary
if: matrix.os == 'windows-latest'
run: Compress-Archive -Path chime.exe -DestinationPath chime.exe.zip
- name: tar up the binary
if: matrix.os != 'windows-latest'
run: tar -cf chime.tar.gz chime
- name: Upload binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: chime${{ matrix.ext }}
asset_name: chime-x86_64-${{ matrix.name }}${{ matrix.ext}}
asset_path: chime${{ matrix.ext }}${{ matrix.archive }}
asset_name: chime-${{ github.event.release.tag_name }}-x86_64-${{ matrix.name }}${{ matrix.archive }}
asset_content_type: application/octet-stream

0 comments on commit e114577

Please sign in to comment.