File tree Expand file tree Collapse file tree 2 files changed +41
-4
lines changed
Expand file tree Collapse file tree 2 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a .NET project
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+ name : .NET
5+
6+ on :
7+ workflow_dispatch :
8+ push :
9+ branches :
10+ - stable
11+ - alpha
12+ tags-ignore :
13+ - ' [0-9]+.[0-9]+.[0-9]+'
14+ - ' [0-9]+.[0-9]+.[0-9]+-*'
15+ jobs :
16+ build :
17+
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Setup .NET
23+ uses : actions/setup-dotnet@v4
24+ with :
25+ dotnet-version : 8.0.x
26+ - name : Restore dependencies
27+ run : dotnet restore
28+ - name : Test
29+ run : dotnet test --verbosity normal
30+ - name : Build
31+ run : dotnet build --no-restore --configuration Release
32+ - name : Create the package
33+ run : dotnet pack --no-build --configuration Release
34+ - name : Publish the package to nuget.org
35+ run : dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
36+ env :
37+ NUGET_AUTH_TOKEN : ${{ secrets.NUGET_AUTH_TOKEN }}
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ name: .NET
66on :
77 workflow_dispatch :
88 push :
9- branches : [ "master" ]
10- tags : ['*']
11-
9+ tags :
10+ - ' [0-9]+.[0-9]+.[0-9]+ '
11+ - ' [0-9]+.[0-9]+.[0-9]+-* '
1212jobs :
13- build :
13+ build-and-publish :
1414
1515 runs-on : ubuntu-latest
1616
You can’t perform that action at this time.
0 commit comments