diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index ccd055d845..f1806eb9a4 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -170,15 +170,6 @@ jobs: ref: main fetch-depth: 0 - - name: Install Rustup for Windows ARM64 - shell: pwsh - if: ${{ matrix.os == 'windows-11-arm' }} - run: | - curl.exe -sSf -o rustup-init.exe https://win.rustup.rs - ./rustup-init.exe -y - echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - $env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH" - - name: Install Wix Toolset 6 for Windows shell: pwsh if: ${{ startsWith(matrix.os, 'windows') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fcc71eebe..66f8968caa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,24 +35,15 @@ jobs: - armv7-unknown-linux-musleabihf - riscv64gc-unknown-linux-gnu - loongarch64-unknown-linux-gnu - extra: ['bin'] include: - target: aarch64-apple-darwin os: macos-latest - target: x86_64-apple-darwin os: macos-latest - target: x86_64-pc-windows-msvc - extra: 'bin' - os: windows-latest - - target: x86_64-pc-windows-msvc - extra: msi os: windows-latest - target: aarch64-pc-windows-msvc - extra: 'bin' - os: windows-latest - - target: aarch64-pc-windows-msvc - extra: msi - os: windows-latest + os: windows-11-arm - target: x86_64-unknown-linux-gnu os: ubuntu-22.04 - target: x86_64-unknown-linux-musl @@ -75,6 +66,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Wix Toolset 6 for Windows + shell: pwsh + if: ${{ startsWith(matrix.os, 'windows') }} + run: | + dotnet tool install --global wix --version 6.0.0 + dotnet workload install wix + $wixPath = "$env:USERPROFILE\.dotnet\tools" + echo "$wixPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + $env:PATH = "$wixPath;$env:PATH" + wix --version + - name: Update Rust Toolchain Target run: | echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml @@ -88,17 +90,31 @@ jobs: - name: Setup Nushell uses: hustcer/setup-nu@v3 + if: ${{ matrix.os != 'windows-11-arm' }} with: version: 0.103.0 - name: Release Nu Binary id: nu + if: ${{ matrix.os != 'windows-11-arm' }} run: nu .github/workflows/release-pkg.nu env: OS: ${{ matrix.os }} REF: ${{ github.ref }} TARGET: ${{ matrix.target }} - _EXTRA_: ${{ matrix.extra }} + + - name: Build Nu for Windows ARM64 + id: nu0 + shell: pwsh + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + $env:OS = 'windows' + $env:REF = '${{ github.ref }}' + $env:TARGET = '${{ matrix.target }}' + cargo build --release --all --target aarch64-pc-windows-msvc + cp ./target/${{ matrix.target }}/release/nu.exe . + ./nu.exe -c 'version' + ./nu.exe ${{github.workspace}}/.github/workflows/release-pkg.nu # WARN: Don't upgrade this action due to the release per asset issue. # See: https://github.com/softprops/action-gh-release/issues/445 @@ -107,7 +123,11 @@ jobs: if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: true - files: ${{ steps.nu.outputs.archive }} + files: | + ${{ steps.nu.outputs.msi }} + ${{ steps.nu0.outputs.msi }} + ${{ steps.nu.outputs.archive }} + ${{ steps.nu0.outputs.archive }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}