diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d03646..f9f27cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,104 +1,104 @@ -name: CI - -on: - push: - branches: [develop] - pull_request: - branches: [develop] - workflow_dispatch: - -env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: true - DOTNET_NOLOGO: true - -jobs: - build: - name: Build & Test - runs-on: ubuntu-latest - strategy: - matrix: - dotnet-version: ["6.0.x", "7.0.x", "8.0.x", "9.0.x", "10.0.x"] - fail-fast: false - - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 6.0.x - 7.0.x - 8.0.x - 9.0.x - 10.0.x - - - name: Restore - run: dotnet restore - - - name: Build - run: dotnet build --no-restore -c Release - - - name: Test - run: dotnet test --no-build -c Release --verbosity normal --collect:"XPlat Code Coverage" - - pack: - name: Pack - runs-on: ubuntu-latest - needs: build - - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: "10.0.x" - - - name: Restore - run: dotnet restore - - - name: Pack - run: dotnet pack src/Xavier/Xavier.csproj -c Release -o ./artifacts - - - name: Upload artifacts - uses: actions/upload-artifact@v6 - with: - name: nupkg - path: ./artifacts/*.nupkg - - - name: Upload symbol artifacts - uses: actions/upload-artifact@v6 - with: - name: snupkg - path: ./artifacts/*.snupkg - - format-check: - name: Format Check - runs-on: ubuntu-latest - - steps: - - name: Configure Git for CRLF - run: | - git config --global core.autocrlf true - - - name: Checkout - uses: actions/checkout@v6 - - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: "10.0.x" - - - name: Restore - run: dotnet restore - - - name: Format check - run: dotnet format --verify-no-changes --verbosity diagnostic +name: CI + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + workflow_dispatch: + +env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + +jobs: + build: + name: Build & Test + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: ["6.0.x", "7.0.x", "8.0.x", "9.0.x", "10.0.x"] + fail-fast: false + + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 6.0.x + 7.0.x + 8.0.x + 9.0.x + 10.0.x + + - name: Restore + run: dotnet restore + + - name: Build + run: dotnet build --no-restore -c Release + + - name: Test + run: dotnet test --no-build -c Release --verbosity normal --collect:"XPlat Code Coverage" + + pack: + name: Pack + runs-on: ubuntu-latest + needs: build + + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: "10.0.x" + + - name: Restore + run: dotnet restore + + - name: Pack + run: dotnet pack src/Xavier/Xavier.csproj -c Release -o ./artifacts + + - name: Upload artifacts + uses: actions/upload-artifact@v7 + with: + name: nupkg + path: ./artifacts/*.nupkg + + - name: Upload symbol artifacts + uses: actions/upload-artifact@v7 + with: + name: snupkg + path: ./artifacts/*.snupkg + + format-check: + name: Format Check + runs-on: ubuntu-latest + + steps: + - name: Configure Git for CRLF + run: | + git config --global core.autocrlf true + + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: "10.0.x" + + - name: Restore + run: dotnet restore + + - name: Format check + run: dotnet format --verify-no-changes --verbosity diagnostic