File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-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 : publish
5+
6+ on :
7+ release :
8+ types : [published]
9+
10+ jobs :
11+ build-test-pack-publish :
12+
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Setup .NET
20+ uses : actions/setup-dotnet@v4
21+ with :
22+ dotnet-version : |
23+ 8.0.x
24+ 6.0.x
25+
26+ - name : Restore dependencies
27+ run : dotnet restore
28+
29+ - name : Build
30+ run : dotnet build --configuration Release --no-restore
31+
32+ - name : Test
33+ run : dotnet test --no-build --verbosity normal --configuration Release
34+
35+ - name : Pack
36+ run : dotnet pack --configuration Release --no-build -p:PackageVersion=${{ github.event.release.tag_name }}
37+
38+ - name : Publish to NuGet
39+ run : dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
You can’t perform that action at this time.
0 commit comments