File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on :
4+ push :
5+ branches :
6+ - ' *'
7+ pull_request :
8+ branches : [ master ]
9+
10+ jobs :
11+ build :
12+ name : Build and test
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Setup .NET Core
18+ uses : actions/setup-dotnet@v1
19+ with :
20+ dotnet-version : 3.1.101
21+ - name : Install dependencies
22+ run : dotnet restore
23+ - name : Build
24+ run : dotnet build --configuration Release --no-restore
25+ - name : Test
26+ run : dotnet test --no-restore --verbosity normal
Original file line number Diff line number Diff line change 1+ name : Publish to nuget
2+
3+ on :
4+ release :
5+ types : [created, edited]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v2
13+ - name : Install dependencies
14+ run : dotnet restore
15+ - name : Build
16+ run : dotnet build --configuration Release --no-restore
17+ - name : Test
18+ run : dotnet test --no-restore --verbosity normal
19+ - name : Create the package
20+ run : dotnet pack --configuration Release -o Release -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-source
21+ - name : Publish the package to NuGet
22+ env :
23+ NUGET_AUTH_TOKEN : ${{secrets.NUGET_AUTH_TOKEN}}
24+ run : dotnet nuget push Release/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}
You can’t perform that action at this time.
0 commit comments