diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e84d490c68..2b362dbcbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v2 with: submodules: true - - uses: bubba/setup-haskell@7235984 + - uses: actions/setup-haskell@v1.1.3 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' @@ -135,3 +135,30 @@ jobs: name: haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }} path: ${{ steps.compress_wrapper_binary.outputs.path }} + # this generates .gz tarfiles containing all the GHC versions for + # macOS and Linux, used by ghcup + tar: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v2 + + - run: | + for OS in Linux macOS + do + tar -czf haskell-language-server-$OS-${{ github.event.release.tag_name }}.gz haskell-language-server-$OS-*.gz + done + + - uses: actions/upload-release-asset@v1.0.2 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: haskell-language-server-macOS-${{ github.event.release.tag_name }}.gz + asset_name: haskell-language-server-macOS-${{ github.event.release.tag_name }}.gz + asset_content_type: application/gzip + + - uses: actions/upload-release-asset@v1.0.2 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: haskell-language-server-Linux-${{ github.event.release.tag_name }}.gz + asset_name: haskell-language-server-Linux-${{ github.event.release.tag_name }}.gz + asset_content_type: application/gzip diff --git a/docs/releases.md b/docs/releases.md index e058ff5855..b6755dd4d8 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -70,3 +70,15 @@ One caveat is that we need to rename the binaries from haskell-language-server/haskell-language-server-wrapper to hls/hls-wrapper due to path length limitations on windows. But whenever we upload them to the release, we make sure to upload them as their full name variant. + +### ghcup +Ghcup can install hls binaries, provided that there is a tarfile +called `haskell-language-server-{macOS,Linux}-$HLS_VERSION.gz` +included in the GitHub release. The `tar` job in the workflow file automates the creation of this. + +### Windows +Currently building HLS with GHC 8.8.x on Windows is very flakey and so +is not included by default in the GitHub Actions build matrix. Instead +they need to be built and uploaded manually. See [this +PR](https://github.com/haskell/haskell-language-server/issues/276) for +more details