99
1010jobs :
1111 build :
12- name : Build and analyze
12+ name : Build
1313 runs-on : windows-latest
1414 steps :
1515 - name : Set up JDK
2323 with :
2424 fetch-depth : 0
2525
26+ - name : Build
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
30+ shell : powershell
31+ run : |
32+ dotnet build --configuration Release
33+
34+ - name : Upload a Build Artifact
35+ 36+ with :
37+ name : fluentassignments-artifact
38+ path : **\AStar.Dev.FluentAssignments
39+
40+ analyse :
41+ name : Analyze
42+ runs-on : windows-latest
43+ steps :
44+ - name : Set up JDK
45+ 46+ with :
47+ java-version : 17
48+ distribution : ' zulu'
49+
2650 - name : Cache SonarCloud packages
27512852 with :
4569 New-Item -Path .\.sonar\scanner -ItemType Directory
4670 dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
4771
72+ - uses : actions/download-artifact@master
73+ with :
74+ name : fluentassignments-artifact
75+ path : /
76+
4877 - name : Build and analyze
4978 env :
5079 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5483 dotnet tool install --global dotnet-coverage
5584 dotnet tool install --global dotnet-stryker
5685 .\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_astar-dev-fluentassignments" /o:"astar-development" /d:sonar.scanner.scanAll=false /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
57- dotnet build --configuration Release
5886 dotnet stryker --break-at 99
5987 dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Acceptance.Tests"' -f xml -o 'coverage.xml'
6088 .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
6694 - name : Push to NuGet
6795 if : github.ref == 'refs/heads/main'
6896 run : dotnet nuget push "**\AStar.Dev.FluentAssignments.*.nupkg" --api-key ${{secrets.nuget_api_key}} --skip-duplicate --source https://api.nuget.org/v3/index.json
69-
97+
0 commit comments