Skip to content

Instantly share code, notes, and snippets.

@weeyin83
Created June 28, 2022 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weeyin83/409fe6f8b8834219f43744c826ebee8c to your computer and use it in GitHub Desktop.
Save weeyin83/409fe6f8b8834219f43744c826ebee8c to your computer and use it in GitHub Desktop.
```yml
# Basic pipeline that runs at midnight every day of the working week for the main branch.
trigger:
# YAML file in the release branch
schedules:
- cron: "0 0 * * 1-5"
displayName: Daily build at midnight (Monday-Friday)
branches:
include:
- main
pool:
vmImage: 'windows-latest'
demands:
- msbuild
- visualstudio
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: false
projects: '$(Build.SourcesDirectory)\dotnet-core-tutorial.csproj'
arguments: --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)\output
zipAfterPublish: false
```
@weeyin83
Copy link
Author

make public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment