Bump Roslynator.Analyzers from 4.12.11 to 4.15.0 #61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| cache: true | |
| cache-dependency-path: Directory.Packages.props | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" | |
| - name: Upload coverage reports to Codecov | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: '**/coverage.cobertura.xml' | |
| fail_ci_if_error: false | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| cache: true | |
| cache-dependency-path: Directory.Packages.props | |
| - name: Publish Linux x64 | |
| run: dotnet publish src/MCPsharp/MCPsharp.csproj -c Release -r linux-x64 --self-contained -o publish/linux-x64 | |
| - name: Publish macOS arm64 | |
| run: dotnet publish src/MCPsharp/MCPsharp.csproj -c Release -r osx-arm64 --self-contained -o publish/osx-arm64 | |
| - name: Publish macOS x64 | |
| run: dotnet publish src/MCPsharp/MCPsharp.csproj -c Release -r osx-x64 --self-contained -o publish/osx-x64 | |
| - name: Publish Windows x64 | |
| run: dotnet publish src/MCPsharp/MCPsharp.csproj -c Release -r win-x64 --self-contained -o publish/win-x64 | |
| - name: Upload Linux artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: mcpsharp-linux-x64 | |
| path: publish/linux-x64/mcpsharp | |
| - name: Upload macOS arm64 artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: mcpsharp-osx-arm64 | |
| path: publish/osx-arm64/mcpsharp | |
| - name: Upload macOS x64 artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: mcpsharp-osx-x64 | |
| path: publish/osx-x64/mcpsharp | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: mcpsharp-win-x64 | |
| path: publish/win-x64/mcpsharp.exe |