forked from vexx32/PSKoans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
72 lines (57 loc) · 1.35 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# YAML spec:
# https://aka.ms/yaml
name: Build & Test - Azure
trigger:
branches:
include:
- master
tags:
include:
- '*'
pr:
- master
jobs:
- job: Linux
pool:
vmImage: ubuntu-latest
steps:
- template: templates/build-steps.yml
- task: PublishPipelineArtifact@1
displayName: 'Publish External Help Artifacts'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
path: '$(System.DefaultWorkingDirectory)/PSKoans/en-us'
artifact: ExternalHelp
- job: Windows
pool:
vmImage: windows-latest
steps:
- template: templates/build-steps.yml
- job: MacOS
pool:
vmImage: macOS-latest
steps:
- template: templates/build-steps.yml
- job: PublishModule
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
dependsOn:
- Linux
- Windows
- MacOS
pool:
vmImage: ubuntu-latest
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download External Help Artifact'
inputs:
artifact: ExternalHelp
path: '$(System.DefaultWorkingDirectory)/PSKoans/'
- task: PowerShell@2
displayName: 'Deploy to Gallery'
inputs:
targetType: 'filePath'
arguments: $(PSApiKey)
filePath: ./Build/Publish.ps1
errorActionPreference: 'stop'
failOnStderr: true
pwsh: true