-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathappveyor.yml
58 lines (46 loc) · 1.74 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
50
51
52
53
54
55
56
57
58
image: Visual Studio 2017
version: 1.4.0.{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: |
Get-BuildInfo
Start-Build -BuildType Setup, Build
test_script:
- ps: Start-Build -BuildType Setup, Test
# - pwsh: Start-Build -BuildType Setup, Test
on_success:
- ps: |
[Version]$tagVersion = (git describe --tags --abbrev=0 2>$null) -replace "^v"
$shouldPublish = $env:APPVEYOR_REPO_BRANCH -eq 'master' -and
$tagVersion -and
-not $env:APPVEYOR_PULL_REQUEST_NUMBER
if ($shouldPublish) {
$buildInfo = Get-BuildInfo
if ($tagVersion -eq $buildInfo.Version) {
$galleryModule = Find-Module $buildInfo.ModuleName -ErrorAction SilentlyContinue
if (-not $galleryVersion -or $buildInfo.Version -gt $galleryModule.Version) {
Start-Build -BuildType Setup, Publish
} else {
Write-Host ('Skipping publish: {0} is already published' -f $env:APPVEYOR_REPO_TAG_NAME) -ForegroundColor Green
}
} else {
Write-Host ('Skipping publish: Tag {0} does not match build version {1}' -f $tagVersion, $buildInfo.Version)
}
}