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