Skip to content

Commit aea8b2f

Browse files
committed
Upgrade to NUKE 10 and use latest GH Actions steps
1 parent 78cb0fa commit aea8b2f

File tree

5 files changed

+27
-21
lines changed

5 files changed

+27
-21
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
if: needs.can_document.outputs.value == 'true'
2727

2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v5
3030

3131
- name: Use Node.js
32-
uses: actions/setup-node@v1
32+
uses: actions/setup-node@v5
3333
with:
34-
node-version: "14.x"
34+
node-version: "20.x"
3535
registry-url: 'https://registry.npmjs.org'
3636

3737
- name: Install Dependencies
@@ -48,15 +48,13 @@ jobs:
4848
runs-on: ubuntu-latest
4949

5050
steps:
51-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v5
5252

5353
- name: Setup dotnet
54-
uses: actions/setup-dotnet@v1
54+
uses: actions/setup-dotnet@v5
5555
with:
5656
dotnet-version: |
57-
6.0.x
58-
7.0.x
59-
8.0.x
57+
10.0.x
6058
6159
- name: Build
6260
run: ./build.sh
@@ -65,15 +63,13 @@ jobs:
6563
runs-on: windows-latest
6664

6765
steps:
68-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v5
6967

7068
- name: Setup dotnet
71-
uses: actions/setup-dotnet@v1
69+
uses: actions/setup-dotnet@v5
7270
with:
7371
dotnet-version: |
74-
6.0.x
75-
7.0.x
76-
8.0.x
72+
10.0.x
7773
7874
- name: Build
7975
run: |

build.cmd

100644100755
File mode changed.

build.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"
1818

1919
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
2020
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
21-
$DotNetChannel = "Current"
21+
$DotNetChannel = "STS"
2222

23-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
2423
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
25-
$env:DOTNET_MULTILEVEL_LOOKUP = 0
24+
$env:DOTNET_NOLOGO = 1
2625

2726
###########################################################################
2827
# EXECUTION
@@ -61,9 +60,15 @@ else {
6160
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
6261
}
6362
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
63+
$env:PATH = "$DotNetDirectory;$env:PATH"
6464
}
6565

6666
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
6767

68+
if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
69+
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
70+
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
71+
}
72+
6873
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
6974
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
1414

1515
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
1616
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
17-
DOTNET_CHANNEL="Current"
17+
DOTNET_CHANNEL="STS"
1818

1919
export DOTNET_CLI_TELEMETRY_OPTOUT=1
20-
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
21-
export DOTNET_MULTILEVEL_LOOKUP=0
20+
export DOTNET_NOLOGO=1
2221

2322
###########################################################################
2423
# EXECUTION
@@ -54,9 +53,15 @@ else
5453
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
5554
fi
5655
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
56+
export PATH="$DOTNET_DIRECTORY:$PATH"
5757
fi
5858

5959
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
6060

61+
if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
62+
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
63+
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
64+
fi
65+
6166
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
6267
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"

nuke/_build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<RootNamespace></RootNamespace>
77
<NoWarn>CS0649;CS0169</NoWarn>
88
<NukeRootDirectory>..</NukeRootDirectory>
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Nuke.Common" Version="6.2.1" />
14+
<PackageReference Include="Nuke.Common" Version="10.0.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

0 commit comments

Comments
 (0)