Bump System.CommandLine from 2.0.0-beta4.22272.1 to 2.0.0-rc.2.25502.107 #43
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: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DEPENDABOT_REF_NAME: ${{ vars.DEPENDABOT_REF_NAME || 'dependabot' }} | |
| PACKAGE_DIRECTORY: ./nupkg | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v3 | |
| with: | |
| versionSpec: ${{ vars.GITVERSION_VERSION_SPEC }} | |
| preferLatestVersion: ${{ vars.GITVERSION_PREFER_LATEST_VERSION }} | |
| - name: Determine version | |
| id: version | |
| uses: gittools/actions/gitversion/execute@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 9.x | |
| 8.x | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ vars.SOLUTION_FILE }} | |
| - name: Build | |
| run: > | |
| dotnet build | |
| ${{ vars.SOLUTION_FILE }} | |
| --configuration ${{ vars.BUILD_CONFIG }} | |
| --no-restore | |
| --nologo | |
| -p:Version=${{ steps.version.outputs.semVer }} | |
| -p:RepositoryUrl=${{ github.repositoryUrl }} | |
| -p:RepositoryBranch=${{ github.ref_name }} | |
| -p:RepositoryCommit=${{ github.sha }} | |
| - name: Run tests | |
| run: > | |
| dotnet test | |
| ${{ vars.SOLUTION_FILE }} | |
| --configuration ${{ vars.BUILD_CONFIG }} | |
| --no-build | |
| --nologo | |
| -- | |
| --report-trx | |
| --coverage | |
| --coverage-output coverage.cobertura.xml | |
| --coverage-output-format cobertura | |
| --results-directory ../../test-results | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: success() || failure() | |
| with: | |
| name: test-results | |
| path: ./test-results/*.trx | |
| - name: Code Coverage Report | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| with: | |
| filename: ./test-results/coverage.cobertura.xml | |
| badge: true | |
| format: markdown | |
| hide_branch_rate: false | |
| hide_complexity: false | |
| indicators: true | |
| output: both | |
| thresholds: '50 75' | |
| - name: Add Coverage PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: code-coverage-results.md | |
| - name: Pack | |
| if: ${{ !startsWith(github.head_ref || github.ref_name, env.DEPENDABOT_REF_NAME) }} | |
| run: > | |
| dotnet pack | |
| ${{ vars.SOLUTION_FILE }} | |
| --configuration ${{ vars.BUILD_CONFIG }} | |
| --no-restore | |
| --no-build | |
| --nologo | |
| --output ${{ env.PACKAGE_DIRECTORY }} | |
| -p:PackageVersion=${{ steps.version.outputs.semVer }} | |
| -p:RepositoryUrl=${{ github.repositoryUrl }} | |
| -p:RepositoryBranch=${{ github.ref_name }} | |
| -p:RepositoryCommit=${{ github.sha }} | |
| - name: Upload package artefacts | |
| if: ${{ !startsWith(github.head_ref || github.ref_name, env.DEPENDABOT_REF_NAME) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-package-${{ steps.version.outputs.semVer }} | |
| path: | | |
| ${{ env.PACKAGE_DIRECTORY }}/*.nupkg | |
| ${{ env.PACKAGE_DIRECTORY }}/*.snupkg |