domain-nuget #2
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
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: domain-nuget | |
| on: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| include-prerelease: true | |
| - name: Build and pack Entities | |
| run: dotnet build ./RoyalCode.EnterprisePatterns/RoyalCode.Entities/RoyalCode.Entities.csproj -c Release -o ./publish/RoyalCode.Entities | |
| - name: Build and pack Domain Events | |
| run: dotnet build ./RoyalCode.EnterprisePatterns/RoyalCode.DomainEvents/RoyalCode.DomainEvents.csproj -c Release -o ./publish/RoyalCode.DomainEvents | |
| - name: Build and pack Aggregates | |
| run: dotnet build ./RoyalCode.EnterprisePatterns/RoyalCode.Aggregates/RoyalCode.Aggregates.csproj -c Release -o ./publish/RoyalCode.Aggregates | |
| - name: Publish | |
| run: dotnet nuget push ./**/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |