File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 18
18
with :
19
19
global-json-file : ' ./global.json'
20
20
- run : dotnet --version
21
+ - name : Restore dependencies
22
+ run : dotnet restore
21
23
- name : Build
22
- run : dotnet build
24
+ run : dotnet build --configuration Release --no-restore
23
25
- name : Test
24
- run : dotnet test --no-build
26
+ run : dotnet test --configuration Release -- no-build --no-restore
Original file line number Diff line number Diff line change
1
+ name : ' RELEASE'
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ tags :
8
+ - ' v*.*.*'
9
+
10
+ jobs :
11
+ build-and-publish :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ with :
16
+ fetch-depth : 0
17
+ - uses : actions/setup-dotnet@v4
18
+ with :
19
+ global-json-file : ' ./global.json'
20
+ - run : dotnet --version
21
+ - name : Restore dependencies
22
+ run : dotnet restore
23
+ - name : Build
24
+ run : dotnet build --configuration Release --no-restore
25
+ - name : Test
26
+ run : dotnet test --configuration Release --no-build --no-restore
27
+ - name : Pack
28
+ run : dotnet pack --configuration Release --no-build --output ./nupkg
29
+ - name : Push to NuGet
30
+ 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