Created
October 6, 2025 13:11
-
-
Save FrankDeGroot/f7726105dbe81059dcdd4deb6ddda123 to your computer and use it in GitHub Desktop.
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
| jobs: | |
| - job: Build | |
| variables: | |
| # Make it easier to cache packages (see labs) | |
| # https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders | |
| NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages/ | |
| steps: | |
| - task: DotNetCoreCLI@2 | |
| inputs: | |
| command: custom | |
| custom: tool | |
| arguments: restore | |
| workingDirectory: $(Build.SourcesDirectory)/TodoItems.Api | |
| - task: DotNetCoreCLI@2 | |
| inputs: | |
| command: custom | |
| custom: ef | |
| arguments: | |
| migrations script | |
| --output $(Build.ArtifactStagingDirectory)/SQL/db.sql | |
| --idempotent | |
| --project TodoItems.Api.csproj | |
| --context TodoDb | |
| --no-build | |
| --verbose | |
| --configuration Release | |
| workingDirectory: $(Build.SourcesDirectory)/TodoItems.Api | |
| env: | |
| # Ensure migration script is not created against the in-memory database. | |
| ASPNETCORE_ENVIRONMENT: DUMMY | |
| - task: DotNetCoreCLI@2 | |
| inputs: | |
| command: publish | |
| publishWebProjects: false | |
| projects: '**/TodoItems.Api.csproj' | |
| arguments: | |
| --no-restore | |
| --configuration Release | |
| --nologo | |
| --no-build | |
| --output $(Build.ArtifactStagingDirectory)/todoItemsApi | |
| modifyOutputPath: false | |
| zipAfterPublish: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment