-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
42 lines (38 loc) · 1.08 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
37
38
39
40
41
42
trigger:
paths:
exclude:
- azure-pipelines.yml
- .gitignore
- LICENSE
- README.md
branches:
include:
- main
variables:
- name: ModuleName
value: 'PSJsonWebToken'
pool:
vmImage: 'windows-latest'
jobs:
- job: PowerShell_CICD
workspace:
clean: all
steps:
- task: CopyFiles@2
displayName: 'Copy Module Source to Staging'
inputs:
SourceFolder: '$(Build.SourcesDirectory)\$(ModuleName)\'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(ModuleName)\'
CleanTargetFolder: true
OverWrite: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\$(ModuleName)'
ArtifactName: '$(ModuleName)'
publishLocation: 'Container'
- task: PSGalleryPackager@0
inputs:
apiKey: '$(PSGalleryApiKey)'
path: '$(Build.ArtifactStagingDirectory)\$(ModuleName)'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))