File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 11name : .NET Tests
2-
2+ defaults :
3+ working-directory : ./Parameterize.Net
34on :
45 push :
56 branches : [ main ]
Original file line number Diff line number Diff line change 1+ name : Publish NuGet Package
2+ defaults :
3+ working-directory : ./my-project-root
4+ on :
5+ push :
6+ tags :
7+ - ' v*' # triggers on tags like v1.0.0
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v3
16+
17+ - name : Setup .NET
18+ uses : actions/setup-dotnet@v3
19+ with :
20+ dotnet-version : 8.0.x # adjust to your target .NET version
21+
22+ - name : Restore dependencies
23+ run : dotnet restore
24+
25+ - name : Build
26+ run : dotnet build --configuration Release --no-restore
27+
28+ - name : Pack
29+ run : dotnet pack ./Parameterize.Net/Parameterize.Net.csproj --configuration Release --no-build -o ./nupkg
30+
31+ - name : Push to NuGet
32+ uses : nuget/setup-nuget@v3
33+
34+ - name : Publish package
35+ run : dotnet nuget push ./nupkg/*.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