File tree Expand file tree Collapse file tree 3 files changed +28
-15
lines changed
Expand file tree Collapse file tree 3 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,24 @@ image: Visual Studio 2019
22skip_branch_with_pr : true
33
44environment :
5+ # Disable the .NET logo in the console output.
6+ DOTNET_NOLOGO : true
7+ # Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
8+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
9+ # Disable sending .NET CLI telemetry to Microsoft.
10+ DOTNET_CLI_TELEMETRY_OPTOUT : true
11+
512 BUILD_ARTIFACT_PATH : build-artifacts
613
714install :
8- - choco install dotnet-sdk
15+ - choco install dotnet-sdk --version 5.0.200
916
1017build_script :
1118 - ps : dotnet --version
1219 - ps : dotnet restore
1320 - ps : dotnet build --no-restore -c Release
14- - ps : dotnet test --results-directory $env:BUILD_ARTIFACT_PATH/test-results /p:SkipBuildVersioning=true
15- - ps : dotnet pack -c Release -- no-build /p:PackageOutputPath=$env:BUILD_ARTIFACT_PATH
21+ - ps : dotnet test --no-restore -- results-directory $env:BUILD_ARTIFACT_PATH/test-results /p:SkipBuildVersioning=true
22+ - ps : dotnet pack -- no-build -c Release /p:PackageOutputPath=$env:BUILD_ARTIFACT_PATH
1623
1724test : false
1825artifacts :
Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ jobs:
3434 - name : Install dependencies
3535 run : dotnet restore
3636 - name : Build
37- run : dotnet build -c Release -- no-restore
37+ run : dotnet build -- no-restore -c Release
3838 - name : Test with Coverage
39- run : dotnet test --logger trx --results-directory ${{env.BUILD_ARTIFACT_PATH}}/coverage --collect "XPlat Code Coverage" --settings CodeCoverage.runsettings /p:SkipBuildVersioning=true
39+ run : dotnet test --no-restore -- logger trx --results-directory ${{env.BUILD_ARTIFACT_PATH}}/coverage --collect "XPlat Code Coverage" --settings CodeCoverage.runsettings /p:SkipBuildVersioning=true
4040 - name : Pack
41- run : dotnet pack -c Release -- no-build /p:PackageOutputPath=${{env.BUILD_ARTIFACT_PATH}}
41+ run : dotnet pack -- no-build -c Release /p:PackageOutputPath=${{env.BUILD_ARTIFACT_PATH}}
4242 - name : Publish artifacts
4343 uses : actions/upload-artifact@v2
4444 with :
Original file line number Diff line number Diff line change @@ -4,24 +4,30 @@ trigger:
44jobs :
55- job : BuildApplication
66 pool :
7- vmImage : ' ubuntu-latest'
7+ vmImage : ubuntu-latest
88
99 variables :
10- BUILD_CONFIGURATION : ' Release'
10+ BUILD_CONFIGURATION : Release
1111 BUILD_ARTIFACT_PATH : $(Build.ArtifactStagingDirectory)
1212
1313 steps :
14- - script : dotnet build -c $(BUILD_CONFIGURATION)
15- displayName : ' Build Application '
14+ - script : dotnet --version
15+ displayName : .NET version
1616
17- - script : dotnet test /p:SkipBuildVersioning=true
18- displayName : ' Test Application'
17+ - script : dotnet restore
18+ displayName : Install dependencies
19+
20+ - script : dotnet build --no-restore -c $(BUILD_CONFIGURATION)
21+ displayName : Build
22+
23+ - script : dotnet test --no-restore /p:SkipBuildVersioning=true
24+ displayName : Test
1925
2026 - script : dotnet pack --no-build -c $(BUILD_CONFIGURATION) /p:PackageOutputPath=$(BUILD_ARTIFACT_PATH)
21- displayName : ' Pack Build '
27+ displayName : Pack
2228
2329 - task : PublishBuildArtifacts@1
24- displayName : ' Publish Build Artifacts '
30+ displayName : Publish artifacts
2531 inputs :
26- ArtifactName : ' BuildVersioning'
32+ ArtifactName : BuildVersioning
2733 pathToPublish : $(BUILD_ARTIFACT_PATH)
You can’t perform that action at this time.
0 commit comments