Skip to content

Commit fa1891c

Browse files
committed
CI: test on .NET 5
1 parent 81b30d6 commit fa1891c

File tree

2 files changed

+18
-42
lines changed

2 files changed

+18
-42
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,65 +12,41 @@ on:
1212
- created
1313

1414
jobs:
15-
package:
16-
# build, test, and deploy the core package on Linux
17-
name: Package
18-
runs-on: ubuntu-latest
19-
env:
20-
CSPROJ_CORE: src/Spectrogram/Spectrogram.csproj
21-
CSPROJ_TESTS: src/Spectrogram.Tests/Spectrogram.Tests.csproj
15+
test:
16+
name: Test
17+
runs-on: windows-latest
2218
steps:
2319
- name: 🛒 Checkout
2420
uses: actions/checkout@v2
25-
- name: ✨ Setup .NET Core 3.1
21+
- name: ✨ Setup .NET 5
2622
uses: actions/setup-dotnet@v1
2723
with:
28-
dotnet-version: "3.1.x"
24+
dotnet-version: "5.0.x"
2925
- name: ✨ Setup .NET 6
3026
uses: actions/setup-dotnet@v1
3127
with:
3228
dotnet-version: "6.0.x"
3329
include-prerelease: true
30+
- name: 🛠️ Setup NuGet
31+
uses: nuget/setup-nuget@v1
32+
with:
33+
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
3434
- name: 🚚 Restore
35-
run: |
36-
dotnet restore ${{ env.CSPROJ_CORE }}
37-
dotnet restore ${{ env.CSPROJ_TESTS }}
35+
run: dotnet restore src
3836
- name: 🛠️ Build
39-
run: |
40-
dotnet build ${{ env.CSPROJ_CORE }} --configuration Release
41-
dotnet build ${{ env.CSPROJ_TESTS }}
37+
run: dotnet build src --configuration Release
4238
- name: 🧪 Test
43-
run: dotnet test ${{ env.CSPROJ_TESTS }}
39+
run: dotnet test src
4440
- name: 📦 Pack
45-
run: dotnet pack ${{ env.CSPROJ_CORE }} --configuration Release
41+
run: dotnet pack src --configuration Release
4642
- name: 💾 Store
4743
uses: actions/upload-artifact@v2
4844
with:
4945
name: Packages
5046
retention-days: 1
51-
path: src/Spectrogram/bin/Release/*.nupkg
52-
- name: 🛠️ Setup NuGet
53-
if: github.event_name == 'release'
54-
uses: nuget/setup-nuget@v1
55-
with:
56-
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
47+
path: |
48+
src/Spectrogram/bin/Release/*.nupkg
49+
src/Spectrogram/bin/Release/*.snupkg
5750
- name: 🚀 Publish
5851
if: github.event_name == 'release'
59-
run: nuget push "src/Spectrogram/bin/Release/*.nupkg" -SkipDuplicate -Source https://api.nuget.org/v3/index.json
60-
61-
solution:
62-
# build the whole solution (.NET Framework demos require Windows/MSBuild)
63-
name: Build Solution
64-
runs-on: windows-latest
65-
steps:
66-
- name: 🛒 Checkout
67-
uses: actions/checkout@v1
68-
- name: ✨ Setup NuGet
69-
uses: nuget/setup-nuget@v1
70-
- name: ✨ Setup MSBuild
71-
uses: microsoft/[email protected]
72-
- name: 🚚 Restore
73-
working-directory: src
74-
run: nuget restore
75-
- name: 🛠️ Build Release
76-
run: msbuild src -verbosity:minimal
52+
run: nuget push "src\Spectrogram\bin\Release\*.nupkg" -SkipDuplicate -Source https://api.nuget.org/v3/index.json

src/Spectrogram.Tests/Spectrogram.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>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)