From e114577798df7a9577ce53c4d5c3c020941413cc Mon Sep 17 00:00:00 2001 From: Jeremy Schlatter Date: Wed, 29 Apr 2020 17:35:42 -0700 Subject: [PATCH] update release process - 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 --- .github/workflows/release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b675df..8b2c96b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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/upload-release-asset@v1.0.1 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