@@ -236,16 +236,17 @@ jobs:
236236 with :
237237 name : alr-bin-${{ matrix.platform.id }}.zip
238238
239- # On Windows runners, 7zip is available instead of zip. Rather than
240- # installing zip from MSYS2 we simply use 7zip.
241-
242- - name : Package binaries (non-Windows)
243- if : matrix.platform.os != 'windows-latest'
244- run : zip alr-bin.zip bin/alr* LICENSE.txt
245-
246- - name : Package binaries (Windows)
239+ # On Windows, install zip as it is not available by default
240+ - name : Install zip (Windows)
247241 if : matrix.platform.os == 'windows-latest'
248- run : 7z a alr-bin.zip bin/alr.exe LICENSE.txt
242+ run : choco install zip
243+
244+ - name : Package binaries
245+ shell : bash
246+ # Mark executable as artifacts remove the executable bit
247+ run : |
248+ chmod +x bin/alr*
249+ zip alr-bin.zip bin/alr* LICENSE.txt
249250
250251 - name : Upload binary assets
251252 uses : actions/upload-release-asset@v1
@@ -278,6 +279,15 @@ jobs:
278279 with :
279280 name : alr-bin-x86_64-windows.zip
280281
282+ - name : Copy to preinstall location
283+ shell : bash
284+ run : |
285+ INSTALL_DIR=$PWD/alr_install
286+ echo "INSTALL_DIR=$INSTALL_DIR" >> $GITHUB_ENV
287+ mkdir -p $INSTALL_DIR/bin
288+ cp bin/alr.exe $INSTALL_DIR/bin
289+ cp LICENSE.txt $INSTALL_DIR
290+
281291 # We need to install MSYS2 again. This is a bit wasteful since the build
282292 # job already did it, but at least this way things are more clearly
283293 # separated. If we rely on an existing Alire, we might hit the cache rather
@@ -310,7 +320,7 @@ jobs:
310320 shell : bash
311321 working-directory : scripts/installer/
312322 env :
313- ALR_INSTALL_DIR : ${{ runner.temp }}/alr_install
323+ ALR_INSTALL_DIR : ${{ env.INSTALL_DIR }}
314324 ALR_INSTALL_OS : ${{ runner.os }}
315325
316326 - name : Upload installer
@@ -422,7 +432,8 @@ jobs:
422432
423433 - name : Get ref version
424434 id : get_ref
425- run : echo "::set-output name=short_sha::$(echo ${{ github.sha }} | cut -c1-8)"
435+ run : echo "short_sha=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT
436+ shell : bash
426437
427438 - name : Upload as artifact
428439 uses : actions/upload-artifact@v4
@@ -447,6 +458,9 @@ jobs:
447458 with :
448459 name : alr-${{needs.appimage.outputs.short_sha}}-x86_64.AppImage.zip
449460
461+ - name : Mark as executable
462+ run : chmod +x alr.AppImage
463+
450464 - name : Upload AppImage asset
451465 if : (github.event_name == 'release')
452466 uses : actions/upload-release-asset@v1
@@ -461,12 +475,12 @@ jobs:
461475 # ##################
462476 # release-nightly #
463477 # ##################
464-
478+
465479 release-nightly :
466480 name : Nightly release on ${{ matrix.platform.id }}
467- if : >
468- github.event_name == 'schedule'
469- || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_nightly != 'false')
481+ if : >
482+ github.event_name == 'schedule'
483+ || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_nightly != 'false')
470484 || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'nightly'))
471485 needs : [build, build-macos-universal]
472486 runs-on : ${{ matrix.platform.os }}
@@ -508,16 +522,18 @@ jobs:
508522 id : date
509523 run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
510524 shell : bash
511-
525+
512526 - name : Get metadata
513527 run : |
514528 touch alr-date-is-${{steps.date.outputs.date}}.txt
515529 touch alr-commit-is-${{github.sha}}.txt
516530 shell : bash
517531
518532 - name : Package binaries
519- run : zip alr-nightly-bin-${{matrix.platform.id}}.zip bin/alr* LICENSE.txt alr-*.txt
520-
533+ run : |
534+ chmod +x bin/alr*
535+ zip alr-nightly-bin-${{matrix.platform.id}}.zip bin/alr* LICENSE.txt alr-*.txt
536+
521537 # The uploader needs Python with the github module
522538
523539 - name : Set up Python
@@ -541,8 +557,8 @@ jobs:
541557 release-nightly-appimage :
542558 name : Nightly AppImage
543559 if : >
544- github.event_name == 'schedule'
545- || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_nightly != 'false')
560+ github.event_name == 'schedule'
561+ || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_nightly != 'false')
546562 || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'nightly'))
547563 needs : [appimage]
548564 runs-on : ubuntu-22.04
@@ -555,12 +571,14 @@ jobs:
555571 name : alr-${{needs.appimage.outputs.short_sha}}-x86_64.AppImage.zip
556572
557573 - name : Rename binary
558- run : mv alr.AppImage alr-nightly-x86_64.AppImage
574+ run : |
575+ chmod +x alr.AppImage
576+ mv alr.AppImage alr-nightly-x86_64.AppImage
559577
560578 - name : Upload to release
561579 uses : pyTooling/Actions/releaser/composite@r4
562580 with :
563- token : ${{ secrets.GITHUB_TOKEN }}
581+ token : ${{ secrets.GITHUB_TOKEN }}
564582 tag : nightly
565583 rm : false
566584 files : alr-nightly-x86_64.AppImage
0 commit comments