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 : build and test
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ build :
11+
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Setup .NET
17+ uses : actions/setup-dotnet@v1
18+ with :
19+ dotnet-version : 6.0.x
20+ - name : Restore dependencies
21+ run : dotnet restore
22+ - name : Build
23+ run : dotnet build --configuration Release --no-restore
24+ - name : Test
25+ run : dotnet test --configuration Release --no-build --verbosity normal
Original file line number Diff line number Diff line change 1+ name : build, test, pack and push
2+
3+ on :
4+ push :
5+ tags :
6+ - ' **'
7+
8+ jobs :
9+ build :
10+
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Setup .NET
16+ uses : actions/setup-dotnet@v1
17+ with :
18+ dotnet-version : 6.0.x
19+ - name : Checkout
20+ uses : actions/checkout@v2
21+ with :
22+ fetch-depth : 0
23+ - name : Get the version
24+ id : get_version
25+ run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
26+ - name : Restore dependencies
27+ run : dotnet restore
28+ - name : Build
29+ run : dotnet build --configuration Release --no-restore
30+ - name : Test
31+ run : dotnet test --configuration Release --no-build --verbosity normal
32+ - name : Package nuget
33+ run : dotnet pack ./src/CromulentBisgetti.ContainerPacking/CromulentBisgetti.ContainerPacking.csproj --configuration release -o:package /p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
34+ - name : Push generated package to GitHub registry
35+ run : dotnet nuget push ./package/*.nupkg --source "https://nuget.pkg.github.com/DigitecGalaxus/index.json" --api-key ${{ github.token }}
36+ - name : Push generated package to nuget registry
37+ run : dotnet nuget push ./package/*.nupkg --source "https://api.nuget.org/v3/index.json" -k ${{ secrets.NUGET_API_KEY }}
You can’t perform that action at this time.
0 commit comments