forked from PowerShell/DscResource.Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
69 lines (59 loc) · 2.14 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
59
60
61
62
63
64
65
66
67
68
69
#---------------------------------#
# environment configuration #
#---------------------------------#
version: 1.2.6.{build}
environment:
gallery_api:
secure: lbDrWTaiRIaEUnUacZbYJHSaCGvAZfz8HsfoaE5uc5NuoebPCvptrlXzRTHN10v9
install:
- git clone https://github.com/PowerShell/DscResource.Tests
- ps: Write-Verbose -Message "PowerShell version $($PSVersionTable.PSVersion)" -Verbose
- ps: Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
- ps: Invoke-AppveyorInstallTask
- ps: Install-Module -Name 'xHyper-V' -MinimumVersion '3.16.0.0' -Verbose
#---------------------------------#
# build configuration #
#---------------------------------#
build: false
#---------------------------------#
# test configuration #
#---------------------------------#
test_script:
- ps: |
Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo
# scripts to run before deployment
after_test:
- ps: |
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
#Invoke-AppveyorAfterTestTask -Type Wiki -Author 'sergei.s.betke' -Owners 'sergei.s.betke'
Invoke-AppveyorAfterTestTask -Author 'sergei.s.betke' -Owners 'sergei.s.betke'
#---------------------------------#
# deployment configuration #
#---------------------------------#
before_deploy:
- ps: >-
${env:ReleaseNotes} = ( Import-Module $env:APPVEYOR_BUILD_FOLDER -Force -PassThru ).ReleaseNotes;
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: $(APPVEYOR_REPO_TAG_NAME)
description: $(ReleaseNotes)
auth_token:
secure: H6HQrXUd6e0XBLfgdcrQ7T78c3+NTlMF92eBHy79j9W1n20zW8uJDNKzk0v82VM9
artifact:
draft: false
prerelease: false
force_update: false
on:
branch: master
APPVEYOR_REPO_TAG: true
deploy_script:
- ps: |
$ErrorActionPreference = 'Continue'
$deploy = ( $env:APPVEYOR_REPO_TAG -eq $true )
if ( $deploy )
{
git clean -ffdx
Remove-Item -Path '.*','Examples','Tests','*.json' -Recurse -Force
Publish-Module -Path . -NuGetApiKey $env:gallery_api
}