Bump Microsoft.Testing.Platform from 2.3.1 to 2.3.2 #248
Workflow file for this run
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, test and publish dotnet | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| jobs: | |
| dotnet-build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Check formatting | |
| run: dotnet format --verify-no-changes | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal --configuration Release -- --coverlet --coverlet-output-format cobertura | |
| - name: Install report generator | |
| run: dotnet tool install --global dotnet-reportgenerator-globaltool | |
| - name: Pack the project | |
| run: dotnet pack --configuration Release | |
| - name: Generate coverage report | |
| run: reportgenerator -reporttypes:MarkdownSummary -reports:**/coverage.cobertura.*.xml -targetdir:./reports/coverage | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage | |
| path: reports/coverage | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: packages | |
| path: src/*/bin/Release/*.nupkg | |
| - name: Publish coverage report to GitHub Step Summary | |
| run: | | |
| cat reports/coverage/Summary.md >> $GITHUB_STEP_SUMMARY | |
| publish-release-to-nuget: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: dotnet-build | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.x | |
| - name: Download packages | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: packages | |
| - name: NuGet login | |
| uses: NuGet/login@v1 | |
| id: nuget-login | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Publish to NuGet | |
| run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} | |
| - name: Publish to GitHub Packages | |
| run: gh release upload ${{ github.ref_name }} BinkyLabs.OpenAI.Analyzers/bin/Release/*.nupkg --repo ${{ github.repository }} --clobber | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |