-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
49 lines (39 loc) · 1.41 KB
/
appveyor.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
image: Visual Studio 2017
version: 1.3.2.{build}
branches:
only:
- master
skip_commits:
message: /updated? readme.*s/
environment:
nugetapikey:
secure: kp9PPkiJ/iiPfX0b1m/NYh88GLaok3NlJc1XAr6rWH+umpCiZVwvsK9CVfMNYElL
build: false
install:
- ps: |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module InvokeBuild, Indented.Build
Set-Location $env:APPVEYOR_BUILD_FOLDER
- pwsh: |
Install-Module InvokeBuild, Indented.Build
Set-Location $env:APPVEYOR_BUILD_FOLDER
build_script:
- ps: Start-Build -BuildType Setup, Build
test_script:
- ps: Start-Build -BuildType Setup, Test
- pwsh: Start-Build -BuildType Setup, Test
on_success:
- ps: |
$buildInfo = Get-BuildInfo
[Version]$tagVersion = (git describe --tags --abbrev=0 2>$null) -replace "^v"
if ($tagVersion -eq $buildInfo.Version) {
$galleryVersion = [Version](Find-Module $buildInfo.ModuleName).Version
if ($buildInfo.Version -gt $galleryVersion) {
Start-Build -BuildType Setup, Publish
} else {
Write-Host "Skipping publish: Already published" -ForegroundColor Green
}
} else {
Write-Host "Skipping publish: Last tag does not match build version" -ForegroundColor Yellow
}