@@ -7,6 +7,9 @@ defaults:
7
7
on :
8
8
release :
9
9
types : [created]
10
+ push :
11
+ branches :
12
+ - ' *-check-build'
10
13
11
14
jobs :
12
15
build :
30
33
ghc-version : ${{ matrix.ghc }}
31
34
cabal-version : ' 3.4'
32
35
33
- - if : ${{ matrix.ghc == '9.0.1' }}
34
- name : Use modified cabal.project for ghc9
36
+ - name : Use modified cabal.project for ghc9
37
+ if : ${{ matrix.ghc == '9.0.1' }}
35
38
run : cp cabal-ghc901.project cabal.project
36
39
37
40
- name : Shorten binary names
@@ -77,13 +80,13 @@ jobs:
77
80
echo "package floskell" >> cabal.project
78
81
echo " ghc-options: -O0" >> cabal.project
79
82
80
- - name : Build Server
83
+ - name : Build server
81
84
# Try building it twice in case of flakey builds on Windows
82
85
run : |
83
86
cabal build exe:hls -O2 $LINUX_CABAL_ARGS || \
84
87
cabal build exe:hls -O2 $LINUX_CABAL_ARGS -j1
85
88
86
- - name : Compress Server Binary
89
+ - name : Compress server binary
87
90
id : compress_server_binary
88
91
run : |
89
92
HLS_BUILD=$(find dist-newstyle \( -name 'hls' -o -name 'hls.exe' \) -type f)
@@ -101,7 +104,8 @@ jobs:
101
104
echo ::set-output name=extension::gz
102
105
fi
103
106
104
- - name : Upload Server Binary
107
+ - name : Upload server to release
108
+ if : ${{ !contains(github.ref_name, 'check') }}
105
109
uses : actions/upload-release-asset@v1.0.2
106
110
env :
107
111
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -111,16 +115,17 @@ jobs:
111
115
asset_name : haskell-language-server-${{ runner.OS }}-${{ env.GHC_VERSION }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }}
112
116
asset_content_type : ${{ steps.compress_server_binary.outputs.content_type }}
113
117
114
- - uses : actions/upload-artifact@v2
118
+ - name : Upload server to workflow artifacts
119
+ uses : actions/upload-artifact@v2
115
120
with :
116
121
name : haskell-language-server-${{ runner.OS }}-${{ matrix.ghc }}${{env.EXE_EXT}}.${{ steps.compress_server_binary.outputs.extension }}
117
122
path : ${{ steps.compress_server_binary.outputs.path }}
118
123
119
- - name : Build Wrapper
124
+ - name : Build wrapper
120
125
if : matrix.ghc == '8.10.7'
121
126
run : cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
122
127
123
- - name : Compress Wrapper Binary
128
+ - name : Compress wrapper binary
124
129
if : matrix.ghc == '8.10.7'
125
130
id : compress_wrapper_binary
126
131
run : |
@@ -139,8 +144,8 @@ jobs:
139
144
echo ::set-output name=extension::gz
140
145
fi
141
146
142
- - name : Upload Wrapper
143
- if : matrix.ghc == '8.10.7'
147
+ - name : Upload wrapper to the release
148
+ if : ${{ matrix.ghc == '8.10.7' && !contains(github.ref_name, 'check') }}
144
149
uses : actions/upload-release-asset@v1.0.2
145
150
env :
146
151
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -150,31 +155,34 @@ jobs:
150
155
asset_name : haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }}
151
156
asset_content_type : ${{ steps.compress_wrapper_binary.outputs.content_type}}
152
157
153
- - uses : actions/upload-artifact@v2
158
+ - name : Upload wrapper to workflow artifacts
159
+ uses : actions/upload-artifact@v2
154
160
if : matrix.ghc == '8.10.7'
155
161
with :
156
162
name : haskell-language-server-wrapper-${{ runner.OS }}${{env.EXE_EXT}}.${{ steps.compress_wrapper_binary.outputs.extension }}
157
163
path : ${{ steps.compress_wrapper_binary.outputs.path }}
158
-
159
- # generates a custom tarball with sources, used by `ghcup compile hls`
164
+
165
+ # generates a custom tarball with sources, used by `ghcup compile hls`
160
166
src-tar :
161
167
needs : build
162
168
runs-on : ubuntu-18.04
163
-
169
+
164
170
steps :
165
171
- uses : actions/checkout@v2
166
172
with :
167
173
submodules : true
168
-
169
- - name : " Create source tarball"
174
+
175
+ - name : Create source tarball
170
176
run : |
171
177
mkdir src-dist
172
178
git archive --prefix=haskell-language-server-${{ github.event.release.tag_name }}/ \
173
179
--format=tar.gz \
174
180
-o src-dist/haskell-language-server.tar.gz \
175
181
HEAD
176
-
177
- - uses : actions/upload-release-asset@v1.0.2
182
+
183
+ - name : Upload source tarball to the release
184
+ if : ${{ !contains(github.ref_name, 'check') }}
185
+ uses : actions/upload-release-asset@v1.0.2
178
186
env :
179
187
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
180
188
with :
@@ -183,11 +191,12 @@ jobs:
183
191
asset_name : haskell-language-server-${{ github.event.release.tag_name }}-src.tar.gz
184
192
asset_content_type : application/gzip
185
193
186
- - uses : actions/upload-artifact@v2
194
+ - name : Upload source tarball to workflow artifacts
195
+ uses : actions/upload-artifact@v2
187
196
with :
188
197
name : haskell-language-server-${{ github.event.release.tag_name }}-src.tar.gz
189
198
path : src-dist/haskell-language-server.tar.gz
190
-
199
+
191
200
# this generates .gz tarfiles containing binaries for all GHC versions and OS's
192
201
# used by `ghcup install hls`
193
202
tar :
@@ -199,7 +208,8 @@ jobs:
199
208
steps :
200
209
- uses : actions/download-artifact@v2
201
210
202
- - run : |
211
+ - name : Generate tarball with all binaries
212
+ run : |
203
213
# move the binaries for the specific platform into bin/
204
214
mkdir bin
205
215
mv haskell-language-server-${{ matrix.os }}-*/* bin
@@ -214,7 +224,9 @@ jobs:
214
224
fi
215
225
tar -czpf haskell-language-server.tar.gz *
216
226
217
- - uses : actions/upload-release-asset@v1.0.2
227
+ - name : Upload binaries tarball to the release
228
+ if : ${{ !contains(github.ref_name, 'check') }}
229
+ uses : actions/upload-release-asset@v1.0.2
218
230
env :
219
231
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
220
232
with :
@@ -223,7 +235,8 @@ jobs:
223
235
asset_name : haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
224
236
asset_content_type : application/gzip
225
237
226
- - uses : actions/upload-artifact@v2
238
+ - name : Upload binaries tarball to workflow artifacts
239
+ uses : actions/upload-artifact@v2
227
240
with :
228
241
name : haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
229
242
path : bin/haskell-language-server.tar.gz
@@ -234,13 +247,15 @@ jobs:
234
247
steps :
235
248
- uses : actions/download-artifact@v2
236
249
237
- - run : |
238
- # generate sha256 sums for all current artifacts
250
+ - name : Generate sha256 sums for all workflow artifacts
251
+ run : |
239
252
sha256sum --tag haskell-language-server*/* >> SHA256SUMS
240
253
# we clean up tags to match the release file names
241
254
sed -i 's/\/.*)/)/g' SHA256SUMS
242
255
243
- - uses : actions/upload-release-asset@v1.0.2
256
+ - name : Upload sha256sums to the release
257
+ if : ${{ !contains(github.ref_name, 'check') }}
258
+ uses : actions/upload-release-asset@v1.0.2
244
259
env :
245
260
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
246
261
with :
@@ -249,7 +264,8 @@ jobs:
249
264
asset_name : SHA256SUMS
250
265
asset_content_type : plain/text
251
266
252
- - uses : actions/upload-artifact@v2
267
+ - name : Upload sha256sums to workflow artifacts
268
+ uses : actions/upload-artifact@v2
253
269
with :
254
270
name : SHA256SUMS
255
271
path : SHA256SUMS
0 commit comments