diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7149488..1074438e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,11 +33,24 @@ jobs: with: dotnet-version: 9.0.x + # Build the project separately to discern between build and format errors + - name: Build + run: > + dotnet build + -p:CSharpier_Bypass=true + --configuration Release + - name: Verify formatting + id: verify run: > dotnet build -t:CSharpierFormat --configuration Release + --no-restore + + - name: Report issues + if: ${{ failure() && steps.verify.outcome == 'failure' }} + run: echo "::error title=Bad formatting::Formatting issues detected. Please build the solution locally to fix them." test: # Tests need access to secrets, so we can't run them against PRs because of limited trust