Init DevTools Cli #3
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 - Build, Test, and Publish | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| branches: main | |
| jobs: | |
| dotnet-sdk: | |
| name: .NET SDK | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| working-directory: ./src | |
| strategy: | |
| matrix: | |
| dotnet-version: ["8.0.x"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for nbgv to calculate version | |
| - name: Setup .NET ${{ matrix.dotnet-version }} | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: Setup Nerdbank.GitVersioning | |
| uses: dotnet/nbgv@master | |
| with: | |
| setAllVars: true | |
| - name: Restore source dependencies | |
| run: dotnet restore dirs.proj | |
| - name: Restore test dependencies | |
| run: dotnet restore tests.proj | |
| - name: Build source projects | |
| run: dotnet build dirs.proj --no-restore --configuration Release | |
| - name: Build test projects | |
| run: dotnet build tests.proj --no-restore --configuration Release | |
| - name: Run tests | |
| run: dotnet test tests.proj --no-build --configuration Release --verbosity normal | |
| - name: Pack NuGet packages | |
| run: dotnet pack dirs.proj --no-build --configuration Release --output ../NuGetPackages | |