-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add windows to ghcup artifacts and generate sha256 sums (#1970)
* Add windows to ghcup artifacts * Add 7z compress * Make move generic per os * Generate sha256 sums * Include .tar.gz and sums in artefacts * Clean up sha256sums tags
- Loading branch information
Showing
1 changed file
with
42 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 |
---|---|---|
|
@@ -56,6 +56,7 @@ jobs: | |
GHC_VER: ${{ matrix.ghc }} | ||
run: | | ||
echo "EXE_EXT=.exe" >> $GITHUB_ENV | ||
# We normalize windows+choco ghc version 8.10.2.2 | ||
GHC_VER=$(echo $GHC_VER | sed 's/8.10.2.2/8.10.2/g') | ||
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV | ||
|
@@ -74,7 +75,7 @@ jobs: | |
run: | | ||
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV | ||
- name: Tentative Workaround for GHC 8.10.5 on macOS | ||
- name: Workaround for GHC 8.10.5 on macOS | ||
if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' | ||
run: | | ||
echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)" | ||
|
@@ -89,7 +90,6 @@ jobs: | |
- name: Compress Server Binary | ||
id: compress_server_binary | ||
run: | | ||
# We normalize windows+choco ghc version 8.10.2.2 | ||
HLS_BUILD=$(find dist-newstyle \( -name 'hls' -o -name 'hls.exe' \) -type f) | ||
HLS=haskell-language-server-${{env.GHC_VERSION}} | ||
mv $HLS_BUILD $HLS${{env.EXE_EXT}} | ||
|
@@ -167,18 +167,23 @@ jobs: | |
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
os: [Linux, macOS] | ||
os: [Linux, macOS, Windows] | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
|
||
- run: | | ||
# move the binaries for the specific platform into bin/ | ||
mkdir bin | ||
mv haskell-language-server-${{ matrix.os }}-*.gz/haskell-language-server-*.gz bin | ||
mv haskell-language-server-wrapper-${{ matrix.os }}.gz/haskell-language-server-wrapper.gz bin | ||
mv haskell-language-server-${{ matrix.os }}-*/* bin | ||
mv haskell-language-server-wrapper-${{ matrix.os }}.*/* bin | ||
# decompress them | ||
gzip -d bin/*.gz | ||
cd bin | ||
if [[ "${{ matrix.os }}" == "Windows" ]]; then | ||
7z x "*.zip" | ||
rm *.zip | ||
else | ||
gzip -d *.gz | ||
fi | ||
tar -czpf haskell-language-server.tar.gz * | ||
- uses: actions/[email protected] | ||
|
@@ -189,3 +194,34 @@ jobs: | |
asset_path: bin/haskell-language-server.tar.gz | ||
asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz | ||
path: bin/haskell-language-server.tar.gz | ||
|
||
sha256sum: | ||
needs: tar | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
|
||
- run: | | ||
# generate sha256 sums for all current artifacts | ||
sha256sum --tag haskell-language-server*/* >> SHA256SUMS | ||
# we clean up tags to match the release file names | ||
sed -i 's/\/.*)/)/g' SHA256SUMS | ||
- uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: SHA256SUMS | ||
asset_name: SHA256SUMS | ||
asset_content_type: plain/text | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: SHA256SUMS | ||
path: SHA256SUMS |