From fb8c2fec24675597f84252ca2ba84f162f40fe9a Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Tue, 11 Feb 2025 11:24:01 +0100 Subject: [PATCH] fix: consolidate release workflows (#1844) * feat: consolidated single release workflow * Disable untouched workflows * Tweak Ubuntu ARM steps * Add Windows installer steps * Use setup-alire (lighter than alr-install) * universal artifact and release job * Windows exceptionalism (7zip instead of zip) * Restore disabled workflows * Self-review --- .github/workflows/ci-linux-arm.yml | 111 --------- .github/workflows/ci-linux.yml | 104 --------- .github/workflows/ci-macos.yml | 179 --------------- .github/workflows/ci-release.yml | 358 +++++++++++++++++++++++++++++ .github/workflows/ci-windows.yml | 169 -------------- 5 files changed, 358 insertions(+), 563 deletions(-) delete mode 100644 .github/workflows/ci-linux-arm.yml delete mode 100644 .github/workflows/ci-linux.yml delete mode 100644 .github/workflows/ci-macos.yml create mode 100644 .github/workflows/ci-release.yml delete mode 100644 .github/workflows/ci-windows.yml diff --git a/.github/workflows/ci-linux-arm.yml b/.github/workflows/ci-linux-arm.yml deleted file mode 100644 index 387bc86d..00000000 --- a/.github/workflows/ci-linux-arm.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: CI linux - -on: - pull_request: - paths-ignore: - - 'doc/**' - - '**.md' - - '**.rst' - - '**.txt' - release: - types: [published] - workflow_dispatch: - -env: - alire_index: "" - # Empty index: test with master of community index - # Otherwise: test with particular commit/branch - # e.g.: index: "git+https://github.com/alire-project/alire-index@deadbeef" - -jobs: - - build: - name: CI on Linux (ARM) - - runs-on: ubuntu-24.04-arm - # Oldest supported so releases can run on older distros - - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Install FSF toolchain - run: sudo apt-get install -y gnat gprbuild - # GNAT 10 has a bug that fails in the testsuite - - - name: Check toolchain architecture - uses: mosteo-actions/gnat-toolchain-arch-checker@v1 - - - name: Install Python 3.x (required for the testsuite) - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: build only - run: ALIRE_OS=linux gprbuild -j0 -p -P alr_env - - - name: Run test script - run: scripts/ci-github.sh - shell: bash - env: - BRANCH: ${{ github.base_ref }} - INDEX: "" - ALIRE_TESTSUITE_DISABLE_DOCKER: "true" - - # Ascertain whether alr can run without the toolchain that built it - - - name: Remove OS GNAT - run: sudo apt-get remove -y gnat-10 gprbuild - shell: bash - - - name: Check standalone alr - uses: mosteo-actions/alr-standalone-checker@v1 - with: - alr_path: bin - toolchain_path: unused - - - name: Upload binaries - uses: actions/upload-artifact@v4 - with: - name: alr-bin-linux-aarch64.zip - path: | - bin/alr - LICENSE.txt - - - name: Upload logs (if failed) - if: failure() - uses: actions/upload-artifact@v4 - with: - name: e3-log-linux.zip - path: testsuite/out - - # Release steps start here. These only run during a release creation. - - - name: Package binaries - if: (github.event_name == 'release') - run: zip alr-bin-linux.zip bin/alr LICENSE.txt - - - name: Retrieve upload URL for the release - if: (github.event_name == 'release') - id: get_release - uses: bruceadams/get-release@v1.3.2 - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Get release version - if: (github.event_name == 'release') - id: get_version - uses: battila7/get-version-action@v2 - - - name: Upload binary assets - if: (github.event_name == 'release') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: alr-bin-linux.zip - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-aarch64-linux.zip - asset_content_type: application/zip diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml deleted file mode 100644 index a7fc4eec..00000000 --- a/.github/workflows/ci-linux.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: CI linux - -on: - pull_request: - paths-ignore: - - 'doc/**' - - '**.md' - - '**.rst' - - '**.txt' - release: - types: [published] - workflow_dispatch: - -env: - alire_index: "" - # Empty index: test with master of community index - # Otherwise: test with particular commit/branch - # e.g.: index: "git+https://github.com/alire-project/alire-index@deadbeef" - -jobs: - - build: - name: CI on Linux - - runs-on: ubuntu-20.04 - # Oldest supported so releases can run on older distros - - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Install FSF toolchain - uses: alire-project/alr-install@v2 - with: - crates: gnat_native gprbuild - prefix: alire_prefix - - - name: Check toolchain architecture - uses: mosteo-actions/gnat-toolchain-arch-checker@v1 - - - name: Install Python 3.x (required for the testsuite) - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Run test script - run: scripts/ci-github.sh - shell: bash - env: - BRANCH: ${{ github.base_ref }} - INDEX: "" - - # Ascertain whether alr can run without the toolchain that built it - - name: Check standalone alr - uses: mosteo-actions/alr-standalone-checker@v1 - with: - alr_path: bin - toolchain_path: alire_prefix - - - name: Upload binaries - uses: actions/upload-artifact@v4 - with: - name: alr-bin-linux-x86_64.zip - path: | - bin/alr - LICENSE.txt - - - name: Upload logs (if failed) - if: failure() - uses: actions/upload-artifact@v4 - with: - name: e3-log-linux.zip - path: testsuite/out - - # Release steps start here. These only run during a release creation. - - - name: Package binaries - if: (github.event_name == 'release') - run: zip alr-bin-linux.zip bin/alr LICENSE.txt - - - name: Retrieve upload URL for the release - if: (github.event_name == 'release') - id: get_release - uses: bruceadams/get-release@v1.3.2 - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Get release version - if: (github.event_name == 'release') - id: get_version - uses: battila7/get-version-action@v2 - - - name: Upload binary assets - if: (github.event_name == 'release') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: alr-bin-linux.zip - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-x86_64-linux.zip - asset_content_type: application/zip diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml deleted file mode 100644 index 6ede82cf..00000000 --- a/.github/workflows/ci-macos.yml +++ /dev/null @@ -1,179 +0,0 @@ -name: CI macOS - -on: - pull_request: - paths-ignore: - - 'doc/**' - - '**.md' - - '**.rst' - - '**.txt' - release: - types: [published] - workflow_dispatch: - -jobs: - - build: - name: CI on macOS - - strategy: - fail-fast: false - matrix: - os: - - macos-13 # x64 - - macos-latest # arm64 - - runs-on: ${{ matrix.os }} - - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Install FSF toolchain - uses: alire-project/alr-install@v2 - with: - crates: gnat_native gprbuild - prefix: alire_prefix - - - name: Check toolchain architecture - uses: mosteo-actions/gnat-toolchain-arch-checker@v1 - - - name: Install Python 3.x (required for the testsuite) - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Run test script - run: scripts/ci-github.sh - shell: bash - env: - BRANCH: ${{ github.base_ref }} - INDEX: "" - - # Ascertain whether alr can run without the toolchain that built it - - name: Check standalone alr - uses: mosteo-actions/alr-standalone-checker@v1 - with: - alr_path: bin - toolchain_path: alire_prefix - - - name: Upload binaries - uses: actions/upload-artifact@v4 - with: - name: alr-bin-${{ runner.arch }}-macos.zip - path: | - bin/alr - LICENSE.txt - - - name: Upload logs (if failed) - if: failure() - uses: actions/upload-artifact@v4 - with: - name: testsuite-log-macos-${{ runner.arch }}.zip - path: testsuite/out - - # Release steps start here. These only run during a release creation. - - - name: Retrieve upload URL for the release - if: github.event_name == 'release' - id: get_release - uses: bruceadams/get-release@v1.3.2 - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Get release version - id: get_version - if: github.event_name == 'release' - uses: battila7/get-version-action@v2 - - - name: Package release binaries - if: github.event_name == 'release' - run: zip alr-bin-macos.zip bin/alr LICENSE.txt - - - name: Select arch name - id: get_arch - if: github.event_name == 'release' - shell: bash - run: | - case ${{ runner.arch }} in - X64) echo "arch=x86_64" >> $GITHUB_OUTPUT ;; - ARM64) echo "arch=aarch64" >> $GITHUB_OUTPUT ;; - *) echo "Unknown architecture, failing..." && exit 1 ;; - esac - - - name: Upload release assets - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: alr-bin-macos.zip - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-${{ steps.get_arch.outputs.arch }}-macos.zip - asset_content_type: application/zip - - build-macos-universal: - runs-on: macos-latest - needs: [build] - steps: - - name: Install Python 3.x (required for releaser) - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: download x86_64 - uses: robinraju/release-downloader@v1 - with: - fileName: '*-x86_64-macos.zip' - latest: true - preRelease: true - out-file-path: 'x86_64' - extract: true - - - name: download aarch64 - uses: robinraju/release-downloader@v1 - with: - latest: true - preRelease: true - fileName: '*-aarch64-macos.zip' - out-file-path: 'aarch64' - extract: true - - - name: Create universal binary - run: | - mkdir bin - lipo x86_64/bin/alr aarch64/bin/alr -create -output bin/alr - chmod +x bin/alr - cp aarch64/LICENSE.txt . - zip alr-bin-macos.zip bin/alr LICENSE.txt - - # Release steps - - # I think I have to run these first two again, because - # the previous uses are in a different job? - - - name: Retrieve upload URL for the release - if: github.event_name == 'release' - id: get_release - uses: bruceadams/get-release@v1.3.2 - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Get release version - id: get_version - if: github.event_name == 'release' - uses: battila7/get-version-action@v2 - - - name: Upload release assets - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: alr-bin-macos.zip - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-universal-macos.zip - asset_content_type: application/zip - diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml new file mode 100644 index 00000000..00ff340e --- /dev/null +++ b/.github/workflows/ci-release.yml @@ -0,0 +1,358 @@ +# These are the builds that get uploaded as releases. When this workflow is run +# from a regular PR, it stops before the release steps, but the checks are +# always performed. + +name: CI Release + +on: + pull_request: + paths-ignore: + - 'doc/**' + - '**.md' + - '**.rst' + - '**.txt' + release: + types: [published] + workflow_dispatch: + +env: + alire_index: "" + # Empty index: test with master of community index + # Otherwise: test with particular commit/branch + # e.g.: index: "git+https://github.com/alire-project/alire-index@deadbeef" + MSYS64_ROOT: C:\Users\runneradmin\AppData\Local\alire\cache\msys64 + MINGW64_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\mingw64\bin + MSYS2_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin + MSYS2_PACMAN: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman --noconfirm + +jobs: + + ######### + # build # + ######### + + build: + name: build on ${{ matrix.platform.id }} + + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + platform: + - os: macos-13 # x64 + id: x86_64-macos + + - os: macos-latest # arm64 + id: aarch64-macos + + - os: ubuntu-20.04 # x64, oldest supported so releases can run on older distros + id: x86_64-linux + + - os: ubuntu-24.04-arm # new ARM runners + id: aaarch64-linux + + - os: windows-latest + id: x86_64-windows + + steps: + + - name: Check out repository + uses: actions/checkout@v4 + with: + submodules: true + + # Install GNAT, we only need a system compiler for Ubuntu ARM until we have + # Alire-indexed releases for it. + + - name: Install Alire toolchain + if: matrix.platform.id != 'aaarch64-linux' + uses: alire-project/alr-install@v2 + with: + crates: gnat_native gprbuild + prefix: alire_prefix + + - name: Install system toolchain (Ubuntu ARM) + if: matrix.platform.id == 'aaarch64-linux' + run: | + sudo apt-get install -y gnat gprbuild + echo ALIRE_TESTSUITE_DISABLE_DOCKER=true >> $GITHUB_ENV + # GNAT 10 has a bug that fails in the testsuite. Also, we need to disable + # Docker tests on Ubuntu ARM. + + - name: Check toolchain architecture + uses: mosteo-actions/gnat-toolchain-arch-checker@v1 + + - name: Install Python 3.x (required for the testsuite) + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + # The test script itself will build alr + + - name: Run test script + run: scripts/ci-github.sh + shell: bash + env: + BRANCH: ${{ github.base_ref }} + INDEX: "" + + # Ascertain whether alr can run without the toolchain that built it + + - name: Remove system GNAT (Ubuntu ARM) + if: matrix.platform.id == 'aaarch64-linux' + run: sudo apt-get remove -y gnat-13 gprbuild + shell: bash + + - name: Check standalone alr + uses: mosteo-actions/alr-standalone-checker@v1 + with: + alr_path: bin + toolchain_path: alire_prefix + + # Artifacts for later release uploading + + - name: Upload binaries + uses: actions/upload-artifact@v4 + with: + name: alr-bin-${{matrix.platform.id}}.zip + path: | + bin/alr* + LICENSE.txt + + - name: Upload logs (if failed) + if: failure() + uses: actions/upload-artifact@v4 + with: + name: e3-log-${{matrix.platform.id}}.zip + path: testsuite/out + + ######################### + # build-macos-universal # + ######################### + # Joins the two binaries for macOS in a single universal one + + build-macos-universal: + runs-on: macos-latest + needs: build + steps: + + - name: Download x86_64 + uses: actions/download-artifact@v4 + with: + name: alr-bin-x86_64-macos.zip + path: x86_64 + + - name: Download aarch64 + uses: actions/download-artifact@v4 + with: + name: alr-bin-aarch64-macos.zip + path: aarch64 + + - name: Create universal binary + run: | + mkdir bin + lipo x86_64/bin/alr aarch64/bin/alr -create -output bin/alr + chmod +x bin/alr + cp aarch64/LICENSE.txt . + + - name: Upload universal artifact + uses: actions/upload-artifact@v4 + with: + name: alr-bin-universal-macos.zip + path: | + bin/alr + LICENSE.txt + + ########### + # release # + ########### + # Actual uploading of release assets + + release: + name: Release on ${{ matrix.platform.id }} + if: github.event_name == 'release' + needs: [build, build-macos-universal] + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + platform: + - os: macos-13 + id: x86_64-macos + + - os: macos-latest + id: aarch64-macos + + - os: macos-latest + id: universal-macos + + - os: ubuntu-20.04 + id: x86_64-linux + + - os: ubuntu-24.04-arm + id: aaarch64-linux + + - os: windows-latest + id: x86_64-windows + + steps: + + - name: Retrieve binary artifact + uses: actions/download-artifact@v4 + with: + name: alr-bin-${{ matrix.platform.id }}.zip + + # On Windows runners, 7zip is available instead of zip. Rather than + # installing zip from MSYS2 we simply use 7zip. + + - name: Package binaries (non-Windows) + if: matrix.platform.os != 'windows-latest' + run: zip alr-bin.zip bin/alr* LICENSE.txt + + - name: Package binaries (Windows) + if: matrix.platform.os == 'windows-latest' + run: 7z a alr-bin.zip bin/alr.exe LICENSE.txt + + - name: Retrieve upload URL for the release + id: get_release + uses: bruceadams/get-release@v1.3.2 + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Get release version + id: get_version + uses: battila7/get-version-action@v2 + + - name: Upload binary assets + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: alr-bin.zip + asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-${{ matrix.platform.id }}.zip + asset_content_type: application/zip + + ##################### + # windows-installer # + ##################### + # Generation of the Windows installer from Windows-built alr + + windows-installer: + name: Create Windows installer + runs-on: windows-latest + needs: build + + steps: + + - name: Check out repository + uses: actions/checkout@v4 + # We need it for the installer scripts. We don't need submodules now though. + + - name: Download built alr + uses: actions/download-artifact@v4 + with: + name: alr-bin-x86_64-windows.zip + + # We need to install MSYS2 again. This is a bit wasteful since the build + # job already did it, but at least this way things are more clearly + # separated. If we rely on an existing Alire, we might hit the cache rather + # than always reinstalling from scratch. Also, we use setup-alire that is + # lighter than alr-install (which uses setup-alire internally). + + - name: Set up stable Alire (for MSYS2) + uses: alire-project/setup-alire@v4 + + - name: Check MSYS2 installation + run: bin/alr version + shell: bash + + - name: Install qt-installer-framework in msys2 + run: ${{env.MSYS2_PACMAN}} -S mingw64/mingw-w64-x86_64-qt-installer-framework + + - name: Add msys2 /mingw64/bin to the path (for qt-installer-framework) + run: echo '${{env.MINGW64_PATH}}' >> $GITHUB_PATH + shell: bash + + - name: Install zip in msys2 + run: ${{env.MSYS2_PACMAN}} --noconfirm -S zip + + - name: Add msys2 /usr/bin to the path (for zip) + run: echo '${{env.MSYS2_PATH}}' >> $GITHUB_PATH + shell: bash + + - name: Run installer build script + run: bash make-alire-installer + shell: bash + working-directory: scripts/installer/ + env: + ALR_INSTALL_DIR: ${{ runner.temp }}/alr_install + ALR_INSTALL_OS: ${{ runner.os }} + + - name: Upload installer + uses: actions/upload-artifact@v4 + with: + name: installer-x86_64-windows + path: scripts/installer/alire-*.exe + + - name: Upload zip archive + uses: actions/upload-artifact@v4 + with: + name: installer-x86_64-windows.zip + path: scripts/installer/alire-*.zip + + - name: Upload tar archive + uses: actions/upload-artifact@v4 + with: + name: installer-x86_64-windows.tar.xz + path: scripts/installer/alire-*.tar.xz + + ############################# + # release-windows-installer # + ############################# + # Upload the Windows installer as a release asset in its own job, as it + # follows a different naming convention and disk structure than other assets. + + release-windows-installer: + name: Release Windows installer + if: github.event_name == 'release' + needs: [build, windows-installer] + runs-on: windows-latest + + steps: + + - name: Retrieve binary artifact + uses: actions/download-artifact@v4 + with: + name: installer-x86_64-windows + path: installer + + # For the record, list the contents of the installer directory + - name: List installer directory + run: ls -alF installer + shell: bash + + - name: Rename installer + run: copy installer/alire-*.exe installer/alire-install.exe + + - name: Retrieve upload URL for the release + id: get_release + uses: bruceadams/get-release@v1.3.2 + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Get release version + id: get_version + uses: battila7/get-version-action@v2 + + - name: Upload installer asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: installer/alire-install.exe + asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-installer-x86_64-windows.exe + asset_content_type: application/vnd.microsoft.portable-executable diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml deleted file mode 100644 index b57946ab..00000000 --- a/.github/workflows/ci-windows.yml +++ /dev/null @@ -1,169 +0,0 @@ -name: CI Windows - -on: - pull_request: - paths-ignore: - - 'doc/**' - - '**.md' - - '**.rst' - - '**.txt' - release: - types: [published] - workflow_dispatch: - -env: - ALIRE_OS: windows - MSYS64_ROOT: C:\Users\runneradmin\AppData\Local\alire\cache\msys64 - MINGW64_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\mingw64\bin - MSYS2_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin - PACMAN: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman --noconfirm - -jobs: - - build: - name: CI on Windows - - runs-on: windows-latest - - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Install FSF toolchain - uses: alire-project/alr-install@v2 - with: - crates: gnat_native gprbuild - prefix: alire_prefix - - - name: Check toolchain architecture - uses: mosteo-actions/gnat-toolchain-arch-checker@v1 - - - name: Build alr - run: gprbuild -j0 -p -P alr_env - - - name: Remove previous alr's msys2 (so a new one can be tested) - shell: pwsh - run: | - if (Test-Path "${{env.MSYS64_ROOT}}") { - Remove-Item "${{env.MSYS64_ROOT}}" -Recurse -Force } - - - name: Display built alr and trigger install of msys2 - run: ./bin/alr version - - - name: install tar from msys2 (Git tar in Actions VM does not seem to work) - run: ${{env.PACMAN}} -S tar - - - name: Install Python 3.x (required for the testsuite) - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Run test script - run: scripts/ci-github.sh - shell: bash - env: - BRANCH: ${{ github.base_ref }} - INDEX: "" - - - name: Install alr - run: gprinstall -p -P alr_env --prefix=${{ runner.temp }}/alr_install - - # Ascertain whether alr can run without the toolchain that built it - - name: Check standalone alr - uses: mosteo-actions/alr-standalone-checker@v1 - with: - alr_path: bin - toolchain_path: alire_prefix - - - name: Install qt-installer-framework in msys2 - run: ${{env.PACMAN}} -S mingw64/mingw-w64-x86_64-qt-installer-framework - - - name: Add msys2 /mingw64/bin to the path (for qt-installer-framework) - run: echo '${{env.MINGW64_PATH}}' >> $GITHUB_PATH - shell: bash - - - name: Install zip in msys2 - run: ${{env.PACMAN}} --noconfirm -S zip - - - name: Add msys2 /usr/bin to the path (for zip) - run: echo '${{env.MSYS2_PATH}}' >> $GITHUB_PATH - shell: bash - - - name: Run installer build script - run: bash make-alire-installer - shell: bash - working-directory: scripts/installer/ - env: - ALR_INSTALL_DIR: ${{ runner.temp }}/alr_install - ALR_INSTALL_OS: ${{ runner.os }} - - - name: Upload installer - uses: actions/upload-artifact@v4 - with: - name: installer-release-package - path: scripts/installer/alire-*.exe - - - name: Upload zip archive - uses: actions/upload-artifact@v4 - with: - name: zip-release-package - path: scripts/installer/alire-*.zip - - - name: Upload tar archive - uses: actions/upload-artifact@v4 - with: - name: tar-release-package - path: scripts/installer/alire-*.tar.xz - - - name: Upload logs (if failed) - if: failure() - uses: actions/upload-artifact@v4 - with: - name: testsuite-log-windows.zip - path: testsuite/out - - # Release steps start here. These only run during a release creation. - - - name: Retrieve upload URL for the release - if: github.event_name == 'release' - id: get_release - uses: bruceadams/get-release@v1.3.2 - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Rename installer - if: github.event_name == 'release' - run: copy scripts/installer/alire-*.exe scripts/installer/alire-install.exe - - - name: Get release version - if: github.event_name == 'release' - id: get_version - uses: battila7/get-version-action@v2 - - - name: Upload installer asset - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: scripts/installer/alire-install.exe - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-installer-x86_64-windows.exe - asset_content_type: application/vnd.microsoft.portable-executable - - - name: Package binaries - if: github.event_name == 'release' - run: zip alr-bin-windows.zip bin/alr.exe LICENSE.txt - - - name: Upload binary asset - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: alr-bin-windows.zip - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-x86_64-windows.zip - asset_content_type: application/zip -- 2.39.5