-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
47 lines (42 loc) · 1.37 KB
/
azure-pipelines.yml
File metadata and controls
47 lines (42 loc) · 1.37 KB
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
37
38
39
40
41
42
43
44
45
46
47
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Start on commit to master
trigger:
batch: true
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: PowerShell@2
name: SetVersion
displayName: "This sets the version for the NuGet Package"
inputs:
targetType: 'inline'
script: |
Install-Module BuildHelpers -Scope CurrentUser -Force
Import-Module BuildHelpers
$BuildInfo = Get-PSModuleManifest -Path $(Build.SourcesDirectory)
$version = Get-MetaData $BuildInfo
Write-Host "##vso[task.setvariable variable=pkgversion]$version"
pwsh: true
- task: NuGetCommand@2
name: NuGetPack
displayName: "Pack the module with NuGet"
inputs:
command: 'pack'
packagesToPack: '**/*.nuspec'
packDestination: '$(Build.ArtifactStagingDirectory)'
versioningScheme: 'byEnvVar'
versionEnvVar: 'pkgversion'
- task: NuGetCommand@2
name: NuGetPush
displayName: "Push the package to the modulesdirectory"
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '68bd804e-dcb2-4173-a112-4edeae5576d9/1eb64e71-f612-47be-86eb-07f0d4e719a5'