File tree 1 file changed +21
-2
lines changed
1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
- name : Build & test
1
+ name : Build, Test, and Deploy
2
2
3
3
on : [push]
4
4
8
8
steps :
9
9
- name : Checkout code
10
10
uses : actions/checkout@v1
11
+
11
12
- name : Setup .NET
12
13
uses : actions/setup-dotnet@v3
13
14
with :
14
15
dotnet-version : 8.0.x
16
+
17
+ - name : Restore dependencies
18
+ run : dotnet restore
19
+
20
+ - name : Build
21
+ run : dotnet build --no-restore --configuration Release
22
+
15
23
- name : Run tests
16
- run : dotnet test test/SimpleBase.Tests.csproj
24
+ run : dotnet test --no-build --configuration Release
25
+
26
+ - name : Pack
27
+ run : dotnet pack --no-build --configuration Release --output ./nupkg
28
+
29
+ - name : Publish to NuGet
30
+ if : startsWith(github.ref, 'refs/tags/')
31
+ run : dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
32
+
33
+ - name : Publish to GitHub Packages
34
+ if : startsWith(github.ref, 'refs/tags/')
35
+ run : dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.GPM_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
You can’t perform that action at this time.
0 commit comments