Skip to content

Commit a6a8e88

Browse files
Upgrade to .NET 9, pushes to GitHub packages.
1 parent ac19e5a commit a6a8e88

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/workflows/dotnet-desktop.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,36 @@ on:
88

99
jobs:
1010
build:
11-
12-
runs-on: windows-latest
11+
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
15+
1616
- name: Setup .NET
17-
uses: actions/setup-dotnet@v3
17+
uses: actions/setup-dotnet@v4
1818
with:
19-
dotnet-version: 8.0.x
19+
dotnet-version: 9.0.x
20+
2021
- name: Build & Restore
21-
run: dotnet build --configuration Release src\ChristopherBriddock.SortingAlgorithms.sln -p:PackageVersion=${{ secrets.RELEASE_VERSION }}
22+
run: dotnet build --configuration Release src/ChristopherBriddock.SortingAlgorithms.sln -p:PackageVersion=${{ secrets.RELEASE_VERSION }}
23+
2224
- name: Test
23-
run: dotnet test src\ChristopherBriddock.SortingAlgorithms.Tests\ChristopherBriddock.SortingAlgorithms.Tests.csproj
25+
run: dotnet test --configuration Release src/ChristopherBriddock.SortingAlgorithms.Tests/ChristopherBriddock.SortingAlgorithms.Tests.csproj
26+
2427
- name: Publish
25-
run: dotnet publish src\ChristopherBriddock.SortingAlgorithms\ChristopherBriddock.SortingAlgorithms.csproj -c Release -p:PackageVersion=${{ secrets.RELEASE_VERSION }}
28+
run: dotnet publish src/ChristopherBriddock.SortingAlgorithms/ChristopherBriddock.SortingAlgorithms.csproj -c Release -p:PackageVersion=${{ secrets.RELEASE_VERSION }}
29+
2630
- name: Create the package
27-
run: dotnet pack --configuration Release src\ChristopherBriddock.SortingAlgorithms\ChristopherBriddock.SortingAlgorithms.csproj -p:PackageVersion=${{ secrets.RELEASE_VERSION }}
31+
run: dotnet pack --configuration Release src/ChristopherBriddock.SortingAlgorithms/ChristopherBriddock.SortingAlgorithms.csproj -p:PackageVersion=${{ secrets.RELEASE_VERSION }}
32+
2833
- name: Upload a Build Artifact
29-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3035
with:
3136
name: ChristopherBriddock.SortingAlgorithms
32-
path: src/ChristopherBriddock.SortingAlgorithms\bin\Release\net8.0\publish
37+
path: src/ChristopherBriddock.SortingAlgorithms/bin/Release/net9.0/publish
3338
if-no-files-found: error
34-
- name: NuGet push
35-
run: dotnet nuget push "src\ChristopherBriddock.SortingAlgorithms\bin\Release\*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
39+
40+
- name: Push to GitHub Packages
41+
run: dotnet nuget push "src/ChristopherBriddock.SortingAlgorithms/bin/Release/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --skip-duplicate
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/ChristopherBriddock.SortingAlgorithms.Tests/ChristopherBriddock.SortingAlgorithms.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

src/ChristopherBriddock.SortingAlgorithms/ChristopherBriddock.SortingAlgorithms.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
<PropertyGroup>
44
<PackageVersion>$(PackageVersion)</PackageVersion>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<IsPackable>>true</IsPackable>
89
</PropertyGroup>
910

1011
</Project>

0 commit comments

Comments
 (0)