File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Nuget to Github Package
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ - staging
8+ tags :
9+ - " v[0-9]+.[0-9]+.[0-9]+.release"
10+ jobs :
11+ build :
12+
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Setup .NET
18+ uses : actions/setup-dotnet@v1
19+ with :
20+ dotnet-version : 5.0.x
21+ - name : Restore dependencies
22+ run : dotnet restore
23+ - name : Build
24+ run : dotnet build --no-restore --configuration Release
25+ - name : Test
26+ run : dotnet test --no-build --verbosity normal --configuration Release
27+ pack :
28+ runs-on : [ubuntu-latest]
29+ needs : [build]
30+
31+ steps :
32+ - uses : actions/checkout@v2
33+ - name : Setup .NET
34+ uses : actions/setup-dotnet@v1
35+ with :
36+ dotnet-version : 5.0.x
37+ - name : Restore dependencies
38+ run : dotnet restore
39+ - name : Set VERSION variable from tag
40+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
41+ - name : Packing
42+ run : dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
43+ - name : dotnet nuget push NuGet.Workflow.${VERSION}.nupkg --source https://nuget.pkg.github.com/acraven/index.json --api-key ${{github.token}}
You can’t perform that action at this time.
0 commit comments