Skip to content

Commit

Permalink
Support build configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
portega-heat committed Mar 16, 2020
1 parent 139e567 commit 0895cd9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
15 changes: 10 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ steps:
projects: '**/*.csproj'

- task: DotNetCoreCLI@2
displayName: 'Publish the project - Release'
displayName: 'Restore project dependencies'
inputs:
command: 'publish'
command: 'restore'
projects: '**/*.csproj'
publishWebProjects: false
arguments: '--no-build --configuration Release --output $(Build.ArtifactStagingDirectory)/Release'
zipAfterPublish: true

- template: templates/build.yml
parameters:
buildConfiguration: 'Debug'

- template: templates/build.yml
parameters:
buildConfiguration: 'Release'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
Expand Down
19 changes: 19 additions & 0 deletions templates/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
parameters:
buildConfiguration: 'Release'

steps:
- task: DotNetCoreCLI@2
displayName: 'Build the project - ${{ parameters.buildConfiguration }}'
inputs:
command: 'build'
arguments: '--no-restore --configuration ${{ parameters.buildConfiguration }}'
projects: '**/*.csproj'

- task: DotNetCoreCLI@2
displayName: 'Publish the project - ${{ parameters.buildConfiguration }}'
inputs:
command: 'publish'
projects: '**/*.csproj'
publishWebProjects: false
arguments: '--no-build --configuration ${{ parameters.buildConfiguration }} --output $(Build.ArtifactStagingDirectory)/${{ parameters.buildConfiguration }}'
zipAfterPublish: true

0 comments on commit 0895cd9

Please sign in to comment.