Migrate chapter 4 main solution to .NET 10 and add central package management #80
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: Chapter 4 Modular Monolith workflow | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/**" | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - "Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src/**" | |
| env: | |
| CHAPTER_DIR: "Chapter-4-applying-tactical-domain-driven-design/Fitnet/Src" | |
| NUGET_SOURCE_NAME: "evolutionaryArchitecture" | |
| jobs: | |
| build: | |
| defaults: | |
| run: | |
| working-directory: ${{ env.CHAPTER_DIR }} | |
| runs-on: ubuntu-latest | |
| name: Build | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Add Evolutionary Architecture Nuget Source | |
| run: | | |
| if ! dotnet nuget list source | grep -q "${{ env.NUGET_SOURCE_NAME }}"; then | |
| dotnet nuget add source \ | |
| https://nuget.pkg.github.com/${{ inputs.owner }}/index.json \ | |
| --name ${{ env.NUGET_SOURCE_NAME }} \ | |
| --username ${{ github.actor }} \ | |
| --password ${{ inputs.github-token }} \ | |
| --store-password-in-clear-text | |
| fi | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| test: | |
| defaults: | |
| run: | |
| working-directory: ${{ env.CHAPTER_DIR }} | |
| runs-on: ubuntu-latest | |
| name: Test | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Add Evolutionary Architecture Nuget Source | |
| run: | | |
| if ! dotnet nuget list source | grep -q "${{ env.NUGET_SOURCE_NAME }}"; then | |
| dotnet nuget add source \ | |
| https://nuget.pkg.github.com/${{ inputs.owner }}/index.json \ | |
| --name ${{ env.NUGET_SOURCE_NAME }} \ | |
| --username ${{ github.actor }} \ | |
| --password ${{ inputs.github-token }} \ | |
| --store-password-in-clear-text | |
| fi | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Test | |
| run: dotnet test |