File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to NuGet
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ publish :
11+ name : Publish Package
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v3
17+
18+ - name : Setup .NET
19+ uses : actions/setup-dotnet@v3
20+ with :
21+ dotnet-version : ' 9.x'
22+
23+ - name : Restore dependencies
24+ run : dotnet restore
25+
26+ - name : Build the project
27+ run : dotnet build --configuration Release
28+
29+ - name : Pack NuGet package
30+ run : dotnet pack --configuration Release --output ./nupkg
31+
32+ - name : Publish to NuGet
33+ env :
34+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
35+ run : dotnet nuget push "./nupkg/*.nupkg" --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
You can’t perform that action at this time.
0 commit comments