50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: 'Setup Shell Tools'
|
|
description: 'Sets up Nushell and Just for cross-platform development'
|
|
branding:
|
|
icon: 'terminal'
|
|
color: 'purple'
|
|
|
|
outputs:
|
|
nu-version:
|
|
description: 'Installed Nushell version'
|
|
value: ${{ steps.nu-info.outputs.version }}
|
|
just-version:
|
|
description: 'Installed Just version'
|
|
value: ${{ steps.just-info.outputs.version }}
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Setup Nushell
|
|
run: |
|
|
# 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
|
|
# Add to current PATH for immediate use
|
|
export PATH="/usr/local/bin:$PATH"
|
|
# Verify installation and set as default shell
|
|
nu --version
|
|
echo "SHELL=/usr/local/bin/nu" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Get Nushell version
|
|
id: nu-info
|
|
run: echo "version=$(/usr/local/bin/nu --version | head -n1)" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
- name: Setup Just
|
|
uses: extractions/setup-just@v2
|
|
shell: bash
|
|
|
|
- name: Get Just version
|
|
id: just-info
|
|
run: echo "version=$(just --version)" >> $GITHUB_OUTPUT
|
|
shell: bash |