Skip to content

Commit 0aaa5d3

Browse files
committed
Can't imagine this separation into 2 jobs will work
1 parent 93d6207 commit 0aaa5d3

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
build:
12-
name: Build and analyze
12+
name: Build
1313
runs-on: windows-latest
1414
steps:
1515
- name: Set up JDK
@@ -23,6 +23,30 @@ jobs:
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+
uses: actions/[email protected]
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+
uses: actions/[email protected]
46+
with:
47+
java-version: 17
48+
distribution: 'zulu'
49+
2650
- name: Cache SonarCloud packages
2751
uses: actions/[email protected]
2852
with:
@@ -45,6 +69,11 @@ jobs:
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 }}
@@ -54,7 +83,6 @@ jobs:
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 }}"
@@ -66,4 +94,4 @@ jobs:
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

Comments
 (0)