32 lines
799 B
YAML
32 lines
799 B
YAML
variables:
|
|
NUGET_PATH: 'C:\Tools\nuget.exe'
|
|
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
|
|
|
|
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build_job:
|
|
stage: build
|
|
only:
|
|
- branches
|
|
script:
|
|
- '& "$env:NUGET_PATH" restore'
|
|
- '& "$env:MSBUILD_PATH" /p:Configuration=Release /clp:ErrorsOnly'
|
|
- '& "$env:MSBUILD_PATH" src\CiCdExample\CiCdExample.csproj /p:DeployOnBuild=true /p:Configuration=Release /P:PublishProfile=FolderProfile.pubxml'
|
|
artifacts:
|
|
expire_in: 2 days
|
|
paths:
|
|
- '.\src\CiCdExample\bin\Release\Publish\'
|
|
|
|
deploy_job:
|
|
stage: deploy
|
|
only:
|
|
- branches
|
|
script:
|
|
- 'xcopy /y /s ".\src\CiCdExample\bin\Release\Publish\*.*" "C:\inetpub\wwwroot\ci-cd-example"'
|
|
|
|
dependencies:
|
|
- build_job
|
|
|