File tree Expand file tree Collapse file tree 2 files changed +59
-2
lines changed
Expand file tree Collapse file tree 2 files changed +59
-2
lines changed Original file line number Diff line number Diff line change 1- name : Build
1+ name : Build test and pack
22
33on :
44 push :
55 branches : ["main"]
66
7+ pull_request :
8+ branches : ["main"]
9+
710jobs :
811 build :
912 name : Build test and pack
2225 run : dotnet restore
2326
2427 - name : Build
25- run : dotnet build ./src/genocs.cli.csproj --no-restore
28+ run : dotnet build --no-restore
29+
30+ - name : Test
31+ run : dotnet test --no-build --verbosity normal
32+
33+ - name : Pack
34+ run : dotnet pack --no-build --verbosity normal
Original file line number Diff line number Diff line change 1+ # This is a manually triggered nuget build and deploy
2+
3+ name : Publish on NuGet
4+
5+ # Controls when the action will run. Workflow runs when manually triggered using the UI
6+ # or API.
7+ on :
8+ workflow_dispatch :
9+ # Inputs the workflow accepts.
10+ inputs :
11+ version :
12+ # Friendly description to be shown in the UI instead of 'name'
13+ description : " Packages Version"
14+
15+ # Default value if no value is explicitly provided
16+ default : " 5.0.0-preview.4.0"
17+
18+ # Input has to be provided for the workflow to run
19+ required : true
20+
21+
22+ jobs :
23+ build :
24+ name : Update NuGet packages
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v3
29+
30+ - name : Setup .NET
31+ uses : actions/setup-dotnet@v2
32+ with :
33+ dotnet-version : 7.0.x
34+
35+ - name : Restore dependencies
36+ run : dotnet restore
37+
38+ - name : Build
39+ run : dotnet build -c Debug --no-restore
40+
41+ - name : Test
42+ run : dotnet test --no-build --verbosity normal
43+
44+ - name : Pack
45+ run : dotnet pack -c Debug -o out -p:Version=${{ github.event.inputs.version }} --no-build --verbosity normal
46+
47+ - name : Push packages to Nuget
48+ run : dotnet nuget push ./out/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
You can’t perform that action at this time.
0 commit comments