Bump System.Memory from 4.5.4 to 4.5.5 #6
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: CI | |
| on: | |
| # Trigger the workflow on push or pull request, | |
| # but only for the master branch | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - '.github/**' | |
| - 'src/**' | |
| - build.cake | |
| - CodeCoverage.runsettings | |
| - dotnet-tools.json | |
| - global.json | |
| - Key.snk | |
| - NaCl.Core.sln | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'src/**' | |
| - build.cake | |
| - CodeCoverage.runsettings | |
| - dotnet-tools.json | |
| - global.json | |
| - Key.snk | |
| - NaCl.Core.sln | |
| release: | |
| types: | |
| - published | |
| env: | |
| # Disable the .NET logo in the console output. | |
| DOTNET_NOLOGO: true | |
| # Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| # Disable sending usage data to Microsoft | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| # Set the build number in MinVer | |
| MINVERBUILDMETADATA: build.${{github.run_number}} | |
| # Set artifacts directory | |
| BUILD_ARTIFACT_PATH: './Artifacts' | |
| jobs: | |
| build: | |
| name: Build on ${{matrix.os}} | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| #filter: tree:0 | |
| - name: 'Install .NET SDK' | |
| uses: actions/setup-dotnet@v4 | |
| - name: '.NET Restore' | |
| run: dotnet tool restore | |
| - name: 'Build Project' | |
| run: dotnet cake --target=Build | |
| - name: 'Run Unit Tests' | |
| run: dotnet cake --target=Test | |
| - name: 'Pack NuGet' | |
| run: dotnet cake --target=Pack | |
| - name: 'Publish Artifacts' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{matrix.os}} | |
| path: ${{env.BUILD_ARTIFACT_PATH}} | |
| coverage: | |
| name: 'Process Coverage' | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| - name: 'Download Artifact' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: 'ubuntu-latest' | |
| - name: 'Install .NET SDK' | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 8.0.x | |
| 9.0.x | |
| - name: 'Install ReportGenerator' | |
| run: dotnet tool install -g dotnet-reportgenerator-globaltool | |
| - name: 'Generate Coverage Report' | |
| run: reportgenerator -reports:./TestResults/**/coverage.cobertura.xml -targetdir:${{env.BUILD_ARTIFACT_PATH}}/TestResults/Coverage/Reports "-reporttypes:HtmlInline;HTMLChart;Cobertura" | |
| - name: 'Upload Coverage' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: Cobertura.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: 'Publish Coverage Report' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'coverage-report' | |
| path: ${{env.BUILD_ARTIFACT_PATH}} | |
| push-to-github-packages: | |
| name: 'Push GitHub Packages' | |
| needs: build | |
| if: github.ref == 'refs/heads/master' || github.event_name == 'release' | |
| environment: | |
| name: 'GitHub Packages' | |
| url: https://github.com/daviddesmet/NaCl.Core/packages | |
| permissions: | |
| packages: write | |
| runs-on: windows-latest | |
| steps: | |
| - name: 'Download Artifact' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: 'windows-latest' | |
| - name: 'NuGet Push' | |
| run: dotnet nuget push *.nupkg --source https://nuget.pkg.github.com/daviddesmet/index.json --skip-duplicate --api-key ${{secrets.GITHUB_TOKEN}} | |
| push-to-nuget: | |
| name: 'Push NuGet Packages' | |
| needs: build | |
| if: github.event_name == 'release' | |
| environment: | |
| name: 'NuGet' | |
| url: https://www.nuget.org/packages/NaCl.Core | |
| runs-on: windows-latest | |
| steps: | |
| - name: 'Download Artifact' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: 'windows-latest' | |
| - name: 'NuGet Push' | |
| run: | | |
| Get-ChildItem -Filter *.nupkg | | |
| Where-Object { !$_.Name.Contains('preview') } | | |
| ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} } | |
| shell: pwsh |