File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a .NET project
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+ name : Push to NuGet
5+
6+ on :
7+ release :
8+ types : [published]
9+
10+ env :
11+ NET_VERSION : 10.x
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ timeout-minutes : 5
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+ - name : Setup .NET ${{ env.NET_VERSION }}
21+ uses : actions/setup-dotnet@v4
22+ with :
23+ dotnet-version : ${{ env.NET_VERSION }}
24+ - name : Restore dependencies
25+ run : dotnet restore
26+ - name : Build
27+ run : dotnet build --no-restore
28+ - name : Test
29+ run : dotnet test --no-build --verbosity normal
30+ - name : Pack
31+ run : dotnet pack -c Release --no-build --no-restore
32+ - name : Push to NuGet
33+ run : dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
You can’t perform that action at this time.
0 commit comments