Created
April 28, 2021 22:43
-
-
Save davidisnotnull/5feea98be8ebe31b3be924ae098472f9 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
pool: | |
name: Self Hosted | |
demands: npm | |
variables: | |
solution: '**/*.sln' | |
buildConfiguration: 'Release' | |
steps: | |
- task: DotNetCoreCLI@2 | |
displayName: 'Restore Packages' | |
inputs: | |
command: restore | |
projects: '**/*.csproj' | |
- task: DeleteFiles@1 | |
displayName: 'Clean Front End files' | |
inputs: | |
SourceFolder: src/Solution/WebProject/wwwroot | |
Contents: '/dist/*' | |
- task: Npm@1 | |
displayName: 'npm install' | |
inputs: | |
command: ci | |
workingDir: src/Solution/WebProject/Content | |
verbose: false | |
- task: Npm@1 | |
displayName: 'npm run build' | |
inputs: | |
command: custom | |
workingDir: src/Solution/WebProject/Content | |
verbose: false | |
customCommand: 'run build' | |
- task: DotNetCoreCLI@2 | |
displayName: 'Build and Publish' | |
inputs: | |
command: publish | |
publishWebProjects: True | |
arguments: '--configuration $(buildConfiguration) /p:environmentName=$(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' | |
zipAfterPublish: True | |
- task: PublishBuildArtifacts@1 | |
displayName: 'Copy Publish Artifacts' | |
inputs: | |
pathtoPublish: '$(Build.ArtifactStagingDirectory)' | |
artifactName: 'myWebApp' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment