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 : .NET
1+ name : Main branch and package publish
22
33on :
44 push :
55 branches : [ main ]
6- pull_request :
7- branches : [ main ]
86
97jobs :
108 build :
11-
9+ name : Build and test
1210 runs-on : ubuntu-latest
11+ env :
12+ NUGET_KEY : ${{ secrets.NUGET_KEY }}
13+ CONFIGURATION : Release
14+ PACKAGES_DIRECTORY : ./packages
15+ NUGET_SOURCE : https://api.nuget.org/v3/index.json
1316
1417 steps :
1518 - uses : actions/checkout@v3
19+
1620 - name : Setup .NET
1721 uses : actions/setup-dotnet@v2
1822 with :
1923 dotnet-version : 6.0.x
24+
2025 - name : Restore dependencies
2126 run : dotnet restore ./src/OneBitSoftware.Utilities.OperationResult.sln
27+
2228 - name : Build
23- run : dotnet build ./src/OneBitSoftware.Utilities.OperationResult.sln --no-restore
29+ run : dotnet build ./src/OneBitSoftware.Utilities.OperationResult.sln --no-restore --configuration "${{ env.CONFIGURATION }}"
30+
2431 - name : Test
2532 run : dotnet test ./src/OneBitSoftware.Utilities.OperationResult.sln --no-build --verbosity normal
33+
34+ - name : Pack OneBitSoftware.Utilities.OperationResult
35+ run : dotnet pack --no-build --configuration "${{ env.CONFIGURATION }}" ./src/OneBitSoftware.Utilities.OperationResult/OneBitSoftware.Utilities.OperationResult.csproj -o "${{ env.PACKAGES_DIRECTORY }}"
36+
37+ - name : Publish all packages
38+ run : dotnet nuget push "${{ env.PACKAGES_DIRECTORY }}/*.nupkg" --source "${{ env.NUGET_SOURCE }}" --api-key "${{ env.NUGET_KEY }}" --skip-duplicate
Original file line number Diff line number Diff line change 1+ name : Pull request validation
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+
7+ jobs :
8+ build :
9+ name : Build and test
10+ runs-on : ubuntu-latest
11+ env :
12+ NUGET_KEY : ${{ secrets.NUGET_KEY }}
13+ CONFIGURATION : Release
14+ PACKAGES_DIRECTORY : ./packages
15+ NUGET_SOURCE : https://api.nuget.org/v3/index.json
16+
17+ steps :
18+ - uses : actions/checkout@v3
19+
20+ - name : Setup .NET
21+ uses : actions/setup-dotnet@v2
22+ with :
23+ dotnet-version : 6.0.x
24+
25+ - name : Restore dependencies
26+ run : dotnet restore ./src/OneBitSoftware.Utilities.OperationResult.sln
27+
28+ - name : Build
29+ run : dotnet build ./src/OneBitSoftware.Utilities.OperationResult.sln --no-restore --configuration "${{ env.CONFIGURATION }}"
30+
31+ - name : Test
32+ run : dotnet test ./src/OneBitSoftware.Utilities.OperationResult.sln --no-build --verbosity normal
You can’t perform that action at this time.
0 commit comments