@@ -10,45 +10,45 @@ jobs:
1010 runs-on : ubuntu-24.04
1111 steps :
1212 - name : Checkout
13- uses : actions/checkout@v4
13+ uses : actions/checkout@v5
1414 with :
1515 fetch-depth : 0 # needed for Nerdbank.GitVersioning
1616
1717 - name : Setup .NET
18- uses : actions/setup-dotnet@v4
18+ uses : actions/setup-dotnet@v5
1919
2020 - name : Build Unit Tests .NET
21- run : dotnet build -f net9 .0 test/Renci.SshNet.Tests/
21+ run : dotnet build -f net10 .0 test/Renci.SshNet.Tests/
2222
2323 - name : Build IntegrationTests .NET
24- run : dotnet build -f net9 .0 test/Renci.SshNet.IntegrationTests/
24+ run : dotnet build -f net10 .0 test/Renci.SshNet.IntegrationTests/
2525
2626 - name : Run Unit Tests .NET
2727 run : |
2828 dotnet test \
29- -f net9 .0 \
29+ -f net10 .0 \
3030 --no-build \
3131 --logger "console;verbosity=normal" \
3232 --logger GitHubActions \
3333 -p:CollectCoverage=true \
3434 -p:CoverletOutputFormat=cobertura \
35- -p:CoverletOutput=../../coverlet/linux_unit_test_net_9_coverage .xml \
35+ -p:CoverletOutput=../../coverlet/linux_unit_test_net_10_coverage .xml \
3636 test/Renci.SshNet.Tests/
3737
3838 - name : Run Integration Tests .NET
3939 run : |
4040 dotnet test \
41- -f net9 .0 \
41+ -f net10 .0 \
4242 --no-build \
4343 --logger "console;verbosity=normal" \
4444 --logger GitHubActions \
4545 -p:CollectCoverage=true \
4646 -p:CoverletOutputFormat=cobertura \
47- -p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage .xml \
47+ -p:CoverletOutput=../../coverlet/linux_integration_test_net_10_coverage .xml \
4848 test/Renci.SshNet.IntegrationTests/
4949
5050 - name : Archive Coverlet Results
51- uses : actions/upload-artifact@v4
51+ uses : actions/upload-artifact@v5
5252 with :
5353 name : Coverlet Results Linux
5454 path : coverlet
@@ -57,12 +57,12 @@ jobs:
5757 runs-on : windows-2025
5858 steps :
5959 - name : Checkout
60- uses : actions/checkout@v4
60+ uses : actions/checkout@v5
6161 with :
6262 fetch-depth : 0 # needed for Nerdbank.GitVersioning
6363
6464 - name : Setup .NET
65- uses : actions/setup-dotnet@v4
65+ uses : actions/setup-dotnet@v5
6666
6767 - name : Build Solution
6868 run : dotnet build Renci.SshNet.sln
@@ -74,21 +74,21 @@ jobs:
7474 run : dotnet pack
7575
7676 - name : Archive NuGet Package
77- uses : actions/upload-artifact@v4
77+ uses : actions/upload-artifact@v5
7878 with :
7979 name : NuGet Package
8080 path : src/Renci.SshNet/bin/Release/*.*nupkg
8181
8282 - name : Run Unit Tests .NET
8383 run : |
8484 dotnet test `
85- -f net9 .0 `
85+ -f net10 .0 `
8686 --no-build `
8787 --logger "console;verbosity=normal" `
8888 --logger GitHubActions `
8989 -p:CollectCoverage=true `
9090 -p:CoverletOutputFormat=cobertura `
91- -p:CoverletOutput=../../coverlet/windows_unit_test_net_9_coverage .xml `
91+ -p:CoverletOutput=../../coverlet/windows_unit_test_net_10_coverage .xml `
9292 test/Renci.SshNet.Tests/
9393
9494 - name : Run Unit Tests .NET Framework
@@ -103,17 +103,17 @@ jobs:
103103 -p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
104104 test/Renci.SshNet.Tests/
105105
106- Windows-Integration-Tests :
107- name : Windows Integration Tests
106+ Windows-Integration-Tests-NetFramework :
107+ name : Windows Integration Tests .NET Framework
108108 runs-on : windows-2025
109109 steps :
110110 - name : Checkout
111- uses : actions/checkout@v4
111+ uses : actions/checkout@v5
112112 with :
113113 fetch-depth : 0 # needed for Nerdbank.GitVersioning
114114
115115 - name : Setup .NET
116- uses : actions/setup-dotnet@v4
116+ uses : actions/setup-dotnet@v5
117117
118118 - name : Setup WSL2
119119 uses : Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
@@ -140,22 +140,67 @@ jobs:
140140 test\Renci.SshNet.IntegrationTests\
141141
142142 - name : Archive Coverlet Results
143- uses : actions/upload-artifact@v4
143+ uses : actions/upload-artifact@v5
144144 with :
145- name : Coverlet Results Windows
145+ name : Coverlet Results Windows .NET Framework
146146 path : coverlet
147147
148- Publish :
148+ Windows-Integration-Tests-Net :
149+ name : Windows Integration Tests .NET
150+ runs-on : windows-2025
151+ steps :
152+ - name : Checkout
153+ uses : actions/checkout@v5
154+ with :
155+ fetch-depth : 0 # needed for Nerdbank.GitVersioning
156+
157+ - name : Setup .NET
158+ uses : actions/setup-dotnet@v5
159+
160+ - name : Setup WSL2
161+ uses : Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
162+ with :
163+ distribution : Ubuntu-24.04
164+
165+ - name : Setup SSH Server
166+ shell : wsl-bash {0}
167+ run : |
168+ apt-get update && apt-get upgrade -y
169+ apt-get install -y podman
170+ podman build -t renci-ssh-tests-server-image -f test/Renci.SshNet.IntegrationTests/Dockerfile test/Renci.SshNet.IntegrationTests/
171+ podman run --rm -h renci-ssh-tests-server -d -p 2222:22 renci-ssh-tests-server-image
172+
173+ - name : Run Integration Tests .NET
174+ run :
175+ dotnet test `
176+ -f net10.0 `
177+ --logger "console;verbosity=normal" `
178+ --logger GitHubActions `
179+ -p:CollectCoverage=true `
180+ -p:CoverletOutputFormat=cobertura `
181+ -p:CoverletOutput=..\..\coverlet\windows_integration_test_net_9_coverage.xml `
182+ test\Renci.SshNet.IntegrationTests\
183+
184+ - name : Archive Coverlet Results
185+ uses : actions/upload-artifact@v5
186+ with :
187+ name : Coverlet Results Windows .NET
188+ path : coverlet
189+
190+ Publish-GitHub-Package :
191+ name : Publish GitHub Package
149192 runs-on : ubuntu-24.04
150193 if : github.ref == 'refs/heads/develop'
151194 permissions :
152195 packages : write
153196 needs :
154197 - Windows
155198 - Linux
199+ - Windows-Integration-Tests-NetFramework
200+ - Windows-Integration-Tests-Net
156201 steps :
157202 - name : Download NuGet Package
158- uses : actions/download-artifact@v4
203+ uses : actions/download-artifact@v6
159204 with :
160205 name : NuGet Package
161206
@@ -170,3 +215,32 @@ jobs:
170215 dotnet nuget push "*.nupkg" \
171216 --source github \
172217 --api-key ${{ secrets.GITHUB_TOKEN }}
218+
219+ Publish-NuGet-Package :
220+ name : Publish NuGet Package
221+ runs-on : ubuntu-24.04
222+ if : startsWith(github.event.ref, 'refs/tags/20')
223+ permissions :
224+ id-token : write
225+ needs :
226+ - Windows
227+ - Linux
228+ - Windows-Integration-Tests-NetFramework
229+ - Windows-Integration-Tests-Net
230+ steps :
231+ - name : Download NuGet Package
232+ uses : actions/download-artifact@v6
233+ with :
234+ name : NuGet Package
235+
236+ - name : NuGet login (OIDC → temp API key)
237+ uses : NuGet/login@v1
238+ id : login
239+ with :
240+ user : ${{ secrets.NUGET_USER }}
241+
242+ - name : Publish to NuGet Registry
243+ run : |
244+ dotnet nuget push "*.nupkg" \
245+ --source https://api.nuget.org/v3/index.json \
246+ --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
0 commit comments