@@ -136,8 +136,9 @@ jobs:
136
136
# see https://github.com/actions/virtual-environments/issues/2619#issuecomment-788397841
137
137
sudo /usr/sbin/purge
138
138
fi
139
- tar -cvf cabal-head.tar -C $(dirname "$CABAL_EXEC") $(basename "$CABAL_EXEC")
140
- echo "CABAL_EXEC_TAR=cabal-head.tar" >> $GITHUB_ENV
139
+ export CABAL_EXEC_TAR="cabal-head-${{ runner.os }}-x86_64.tar.gz"
140
+ tar -czvf $CABAL_EXEC_TAR -C $(dirname "$CABAL_EXEC") $(basename "$CABAL_EXEC")
141
+ echo "CABAL_EXEC_TAR=$CABAL_EXEC_TAR" >> $GITHUB_ENV
141
142
142
143
# We upload the cabal executable built with the ghc used in the release for:
143
144
# - Reuse it in the dogfooding job (although we could use the cached build dir)
@@ -146,7 +147,7 @@ jobs:
146
147
if : matrix.ghc == env.GHC_FOR_RELEASE
147
148
uses : actions/upload-artifact@v3
148
149
with :
149
- name : cabal-${{ runner.os }}-${{ matrix.ghc }}
150
+ name : cabal-${{ runner.os }}-x86_64
150
151
path : ${{ env.CABAL_EXEC_TAR }}
151
152
152
153
- name : Validate lib-tests
@@ -271,11 +272,11 @@ jobs:
271
272
- name : Download cabal executable from workflow artifacts
272
273
uses : actions/download-artifact@v3
273
274
with :
274
- name : cabal-${{ runner.os }}-${{ matrix.ghc }}
275
+ name : cabal-${{ runner.os }}-x86_64
275
276
path : cabal-head
276
277
277
278
- name : Untar the cabal executable
278
- run : tar -xf ./cabal-head/cabal-head. tar -C ./ cabal-head
279
+ run : tar -xzf ./cabal-head/cabal-head-${{ runner.os }}-x86_64. tar.gz -C cabal-head
279
280
280
281
- name : print-config using cabal HEAD
281
282
run : sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s print-config
@@ -285,6 +286,39 @@ jobs:
285
286
- name : Build using cabal HEAD
286
287
run : sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s build
287
288
289
+ prerelease-head :
290
+ name : Create a GitHub prerelease with the binary artifacts
291
+ runs-on : ubuntu-latest
292
+ if : github.ref == 'refs/heads/master'
293
+
294
+ # IMPORTANT! Any job added to the workflow should be added here too
295
+ needs : [validate, validate-old-ghcs, dogfooding]
296
+
297
+ steps :
298
+ - uses : actions/download-artifact@v2
299
+ with :
300
+ name : cabal-Windows-x86_64
301
+
302
+ - uses : actions/download-artifact@v2
303
+ with :
304
+ name : cabal-Linux-x86_64
305
+
306
+ - uses : actions/download-artifact@v2
307
+ with :
308
+ name : cabal-macOS-x86_64
309
+
310
+ - name : Create GitHub prerelease
311
+ uses :
" marvinpinto/[email protected] "
312
+ with :
313
+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
314
+ automatic_release_tag : " cabal-head"
315
+ prerelease : true
316
+ title : " cabal-head"
317
+ files : |
318
+ cabal-head-Windows-x86_64.tar.gz
319
+ cabal-head-Linux-x86_64.tar.gz
320
+ cabal-head-macOS-x86_64.tar.gz
321
+
288
322
# We use this job as a summary of the workflow
289
323
# It will fail if any of the previous jobs does it
290
324
# This way we can use it exclusively in branch protection rules
0 commit comments