Skip to content

Commit 4b425ca

Browse files
committed
Fix how binaries are tarred together
1 parent 3ca2a6c commit 4b425ca

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,29 +140,31 @@ jobs:
140140
tar:
141141
needs: build
142142
runs-on: ubuntu-latest
143+
strategy:
144+
matrix:
145+
os: [Linux, macOS]
143146
steps:
144147
- uses: actions/download-artifact@v2
145148

146149
- run: |
147-
for OS in Linux macOS
150+
# move the binaries for the specific platform into bin/
151+
mkdir bin
152+
mv haskell-language-server-${{ runner.os }}-*.gz/haskell-language-server${{ runner.os }}-*.gz bin
153+
# decompress them
154+
gzip -d bin/*.gz
155+
# renames haskell-language-server-macOS-8.8.1 => haskell-language-server-8.8.1
156+
for f in bin/*
148157
do
149-
tar -czf haskell-language-server-$OS-${{ github.event.release.tag_name }}.tar.gz haskell-language-server-$OS-*.gz
158+
mv -- "$f" "$(echo "$f" | sed -e 's/haskell-language-server-.\+-/haskell-language-server-/' -)"
150159
done
160+
tar -czf bin/haskell-language-server.tar.gz bin/*
151161
152162
- uses: actions/[email protected]
153163
env:
154164
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155165
with:
156166
upload_url: ${{ github.event.release.upload_url }}
157-
asset_path: haskell-language-server-macOS-${{ github.event.release.tag_name }}.tar.gz
158-
asset_name: haskell-language-server-macOS-${{ github.event.release.tag_name }}.tar.gz
167+
asset_path: bin/haskell-language-server.tar.gz
168+
asset_name: haskell-language-server-${{ runner.os }}-${{ github.event.release.tag_name }}.tar.gz
159169
asset_content_type: application/gzip
160170

161-
- uses: actions/[email protected]
162-
env:
163-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164-
with:
165-
upload_url: ${{ github.event.release.upload_url }}
166-
asset_path: haskell-language-server-Linux-${{ github.event.release.tag_name }}.tar.gz
167-
asset_name: haskell-language-server-Linux-${{ github.event.release.tag_name }}.tar.gz
168-
asset_content_type: application/gzip

0 commit comments

Comments
 (0)