This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
57 lines (51 loc) · 1.59 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
trigger:
# What branches will trigger a build?
branches:
include:
# Any Pull Request merging into the master branch
- master
tags:
include:
- v*
stages:
- stage: Build
jobs:
- job: Build
strategy:
matrix:
"Windows":
VM_IMAGE: "windows-latest"
"Linux":
VM_IMAGE: "ubuntu-latest"
pool:
vmImage: $(VM_IMAGE)
steps:
# Install the prereqs
- template: build/common-steps.yml
# Build and test the project
- pwsh: ./Invoke-Tests.ps1
displayName: "Run tests and coverage"
# Publish code coverage to codecov.io
- script: codecov -f coverage.json -t $(CODECOV_TOKEN)
displayName: Upload coverage to codecov.io
condition: always()
- stage: Publish
jobs:
- job: Publish
pool:
vmImage: ubuntu-18.04
steps:
# Install the prereqs
- template: build/common-steps.yml
- pwsh: dotnet gitversion /output buildserver /nofetch
name: Version
displayName: GitVersion
- pwsh: ./Invoke-Publish.ps1
displayName: Publish to PowerShell Gallery
condition: succeeded()
env:
GitVersion_Version: $(Version.GitVersion.MajorMinorPatch)
GitVersion_PreReleaseTag: $(Version.GitVersion.PreReleaseTag)
POWERSHELL_GALLERY_API_TOKEN: "$(POWERSHELL_GALLERY_API_TOKEN)"
SLACK_TOKEN: "$(SLACK_TOKEN)"
SLACK_URL: "$(SLACK_URL)"