@@ -6,7 +6,7 @@ description: Install .NET 9 SDK and restore dependencies for the NLWebNet librar
66
77steps :
88 - name : Install .NET 9 SDK
9- description : Install the .NET 9 SDK using the official Microsoft installation methods
9+ description : Download and install the .NET 9 SDK for Ubuntu using the official Microsoft install script
1010 run : |
1111 # Check if .NET 9 is already installed
1212 if command -v dotnet &> /dev/null && dotnet --list-sdks | grep -q "9\."; then
@@ -15,34 +15,14 @@ steps:
1515 exit 0
1616 fi
1717
18- # Install .NET 9 SDK using official Microsoft methods
18+ # Download and install .NET 9 SDK using official Microsoft install script
1919 echo "📦 Installing .NET 9 SDK..."
20+ curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 --install-dir ~/.dotnet
2021
21- # For Ubuntu/Debian
22- if command -v apt &> /dev/null; then
23- # Add Microsoft package repository
24- wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
25- sudo dpkg -i packages-microsoft-prod.deb
26- rm packages-microsoft-prod.deb
27-
28- # Install .NET 9 SDK
29- sudo apt update
30- sudo apt install -y dotnet-sdk-9.0
31-
32- # For macOS with Homebrew
33- elif command -v brew &> /dev/null; then
34- brew install dotnet
35-
36- # For other systems, use the official install script (same as GitHub Actions uses internally)
37- else
38- echo "Using official Microsoft .NET install script..."
39- curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 --install-dir ~/.dotnet
40-
41- # Add .NET to PATH if not already present
42- if [[ ":$PATH:" != *":$HOME/.dotnet:"* ]]; then
43- echo 'export PATH="$HOME/.dotnet:$PATH"' >> ~/.bashrc
44- export PATH="$HOME/.dotnet:$PATH"
45- fi
22+ # Add .NET to PATH if not already present
23+ if [[ ":$PATH:" != *":$HOME/.dotnet:"* ]]; then
24+ echo 'export PATH="$HOME/.dotnet:$PATH"' >> ~/.bashrc
25+ export PATH="$HOME/.dotnet:$PATH"
4626 fi
4727
4828 # Verify installation
0 commit comments