Files
LanMountainDesktop/.github/workflows/code-quality.yml
2026-04-19 12:36:14 +08:00

45 lines
1.1 KiB
YAML

name: Quality Check
on:
pull_request:
push:
branches: [ main, master, dev, develop ]
workflow_dispatch:
env:
DOTNET_VERSION: '10.0.x'
Solution_Name: LanMountainDesktop.slnx
DOTNET_gcServer: 1
jobs:
analyze:
runs-on: windows-latest
permissions:
contents: read
pull-requests: write
checks: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
dotnet-quality: 'preview'
- name: Restore
run: dotnet restore ${{ env.Solution_Name }}
- name: Build
run: dotnet build ${{ env.Solution_Name }} -c Release --no-restore -v minimal
- name: Check formatting
run: dotnet format --verify-no-changes --verbosity diagnostic || true
continue-on-error: true