-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
36 lines (30 loc) · 1.12 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pool:
vmImage: 'vs2017-win2016'
name: $(SourceBranchName)+1.$(Date:yyyy.MM)$(Rev:.r)
steps:
- script: echo Starting build pipeline!
displayName: 'Hello from Albanian Xrm'
- powershell: |
echo "##vso[task.setvariable variable=BuildNumber;isOutput=true]$(($env:BuildNumber).Substring(($env:BuildNumber).LastIndexOf('+')+1))"
name: MyVars
env:
BuildNumber: $(Build.BuildNumber)
displayName: 'Set Configuration Variable'
- task: NuGetToolInstaller@0
inputs:
versionSpec: '4.9.x'
displayName: 'Install NuGet 4.9.x'
- task: NuGetCommand@2
displayName: 'Creating NuGet package'
inputs:
command: 'pack'
packagesToPack: '**/*.nuspec'
packDestination: '$(Build.ArtifactStagingDirectory)/NuGet'
buildProperties: version=$(MyVars.BuildNumber)
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- task: PublishBuildArtifacts@1
displayName: 'Publishing NuGet package to pipeline'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/NuGet'
artifactName: 'NuGet Package'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))