1- name : Build
1+ name : ' Build'
22' on ' :
33 push :
44 branches :
5- - develop
6- - master
7- paths-ignore :
8- - docs/**
5+ - ' develop'
6+ - ' master'
7+
98jobs :
10- build-extension :
9+ build :
1110
12- runs-on : windows-latest
11+ runs-on : ' windows-latest'
1312
1413 env :
1514 RepositoryUrl : ' https://github.com/${{ github.repository }}'
1615 RepositoryBranch : ' ${{ github.ref }}'
1716 SourceRevisionId : ' ${{ github.sha }}'
18- Configuration : Release
19- SolutionPath : NuGetSwitcher.sln
20- steps :
21-
22- - name : Checkout repository
23- uses : actions/checkout@v2
24- - name : Setup .NET Core
25- uses : actions/setup-dotnet@v1
26- with :
27- dotnet-version : 3.1.x
28-
29- - name : Setup MSBuild.exe
30- 31- id : MsBuildSetup
32- with :
33- vs-version : ' [16.8,16.9)'
3417
35- # ########################################################################
36- # # Continuous Inspection: Sonar Scan ##
37- # ########################################################################
18+ steps :
19+ - name : ' Checkout repository '
20+ uses : ' actions/checkout@v2 '
3821
39- - name : Set up JDK 11
40- uses : actions/setup-java@v1
41- with :
42- java-version : 1.11
4322
44- - uses : actions/checkout@v2
23+ - name : ' Setup .NET'
24+ uses : ' actions/setup-dotnet@v1'
4525 with :
46- fetch-depth : 0
47-
48- - name : Install SonarCloud scanner
49- if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
50- shell : powershell
51- run : |
52- New-Item -Path .\.sonar\scanner -ItemType Directory
53- dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
54-
55- - name : Build and analyze
56- env :
57- GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
58- SONAR_TOKEN : ' ${{ secrets.SONAR_TOKEN }}'
59- shell : powershell
60- run : >
61- .\.sonar\scanner\dotnet-sonarscanner begin /k:"0UserName_NuGetSwitcher" /o:"0username" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
62-
63- msbuild $env:SolutionPath /t:Restore /t:Rebuild /p:DeployExtension=false
64-
65- .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
26+ dotnet-version : 5.0.x
27+
28+
29+ - name : ' Setup MSBuild'
30+ uses :
' microsoft/[email protected] ' 31+
32+
33+ - name : ' Build'
34+ run : ' msbuild NuGetSwitcher.sln /t:Restore /t:Rebuild -property:Configuration=Release'
0 commit comments