diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6680438..8399271 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,11 +24,20 @@ jobs: - name: Setup Nushell run: | - sudo apt-get update - sudo apt-get install -y curl - curl -sSL https://github.com/nushell/nushell/releases/latest/download/nu-$(curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4)-x86_64-unknown-linux-gnu.tar.gz | tar xz - sudo mv nu*/nu /usr/local/bin/ - nu --version + # Install Nushell following official docs + curl -s https://api.github.com/repos/nushell/nushell/releases/latest \ + | grep "browser_download_url.*x86_64-unknown-linux-gnu" \ + | cut -d : -f 2,3 \ + | tr -d \" \ + | wget -qi - + tar xf nu-*-x86_64-unknown-linux-gnu.tar.gz + sudo mkdir -p /usr/local/bin + sudo cp nu-*/nu /usr/local/bin/ + sudo chmod +x /usr/local/bin/nu + echo "/usr/local/bin" >> $GITHUB_PATH + # Verify installation and set as default shell + /usr/local/bin/nu --version + echo "SHELL=/usr/local/bin/nu" >> $GITHUB_ENV - name: Setup Just uses: extractions/setup-just@v2 @@ -59,11 +68,20 @@ jobs: - name: Setup Nushell run: | - sudo apt-get update - sudo apt-get install -y curl - curl -sSL https://github.com/nushell/nushell/releases/latest/download/nu-$(curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4)-x86_64-unknown-linux-gnu.tar.gz | tar xz - sudo mv nu*/nu /usr/local/bin/ - nu --version + # Install Nushell following official docs + curl -s https://api.github.com/repos/nushell/nushell/releases/latest \ + | grep "browser_download_url.*x86_64-unknown-linux-gnu" \ + | cut -d : -f 2,3 \ + | tr -d \" \ + | wget -qi - + tar xf nu-*-x86_64-unknown-linux-gnu.tar.gz + sudo mkdir -p /usr/local/bin + sudo cp nu-*/nu /usr/local/bin/ + sudo chmod +x /usr/local/bin/nu + echo "/usr/local/bin" >> $GITHUB_PATH + # Verify installation and set as default shell + /usr/local/bin/nu --version + echo "SHELL=/usr/local/bin/nu" >> $GITHUB_ENV - name: Setup Just uses: extractions/setup-just@v2