forked from BatmanAMA/powerbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
51 lines (42 loc) · 1.56 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
version: 1.0.{build}
skip_tags: true
#skip_branch_with_pr: true
install:
#Generalize environment variables to allow build to more readily run in other build systems
- ps: Set-AppveyorBuildVariable -Name repo_version -Value (Test-ModuleManifest -Path .\module\powerbox.psd1).version
- ps: if ($ENV:APPVEYOR_REPO_BRANCH -like 'master') { Add-AppveyorMessage "Publishing version $($ENV:repo_version)" -Category Information}
- ps: |
if ($ENV:APPVEYOR_REPO_BRANCH -notlike 'master') {
Update-AppveyorBuild -Version ("{0}-{1}" -f $ENV:REPO_VERSION, $ENV:APPVEYOR_REPO_BRANCH)
} else {
Update-AppveyorBuild -Version $ENV:REPO_VERSION
}
- ps: Install-Module -Name InvokeBuild -RequiredVersion 5.4.1
- ps: Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.16.1
- ps: Install-Module -Name Pester -RequiredVersion 4.3.1
- ps: Install-Module -Name PlatyPS -RequiredVersion 0.9.0
environment:
nuget_api_key:
secure: TVDL0yRh7Mq8p85ZHiK1/bnBhxCfnKFogJqtuPKY39zJAzRUf8fHYTdVxbAbOEGU
build_script:
- ps: invoke-build
after_build:
- ps: Compress-Archive -Path .\Release\powerbox\$ENV:repo_version -destination .\powerbox.zip
artifacts:
- path: powerbox.zip
name: module
test_script:
- ps: invoke-build -task test
deploy:
- provider: Environment
name: gh
on:
branch: master
- provider: Environment
name: prerelease
on:
branch: /(update|patch).*/
after_deploy:
- ps: Invoke-Build -task Publish
on_failure:
ps: Update-AppveyorBuild -Version "FAILED-$($ENV:APPVEYOR_BUILD_VERSION)"