-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathappveyor.yml
78 lines (67 loc) · 2.53 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
70
71
72
73
74
75
76
77
78
version: 0.1.0.{build}
image:
- Visual Studio 2017
skip_tags: true
#install:
# - git submodule -q update --init --recursive
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
assembly_informational_version: "{version}"
#before_build:
# - nuget restore
# - ps: |
# Write-Host "'before_build' block"
#
# Write-Host "Setting version number in files"
# Add-AppveyorMessage -Message "Setting version number in files" -Category Information
# gci -Filter *.psd1 -Recurse | foreach {(Get-Content $_.FullName -Raw) -replace "ModuleVersion += '\d\.\d\.\d\.\d'", "ModuleVersion = '$env:APPVEYOR_BUILD_VERSION'" | Out-File $_.FullName}
# Write-Host "Calling build script"
# .\Build.ps1
build:
project: ManagedPasswordFilter.sln
configuration:
- Release
after_build:
- ps: |
Write-Host "'after_build' block"
#$Params = @{
#Path = $env:APPVEYOR_BUILD_FOLDER
#Force = $true
#Recurse = $false
#Verbose = $true
#}
#Invoke-PSDeploy @Params # Create nuget package artifacts
dir env:
7z a ManagedPasswordFilter.zip "$($env:APPVEYOR_BUILD_FOLDER)\BuildOutput\InstallVersion\*"
$file = Get-Item -Path ManagedPasswordFilter.zip
#Write-Host "Locating installer to push as artifact"
#Add-AppveyorMessage "Locating installer to push as artifact" -Category Information
#$msifile = Get-ChildItem -Recurse -Filter ManagedPasswordFilter.msi | Select-Object -First 1
#Write-Host "msiFile FullName: $($msifile.FullName)"
Push-AppVeyorArtifact $file.FullName -FileName $file.Name -DeploymentName InstallVersion
artifacts:
- path: ManagedPasswordFilter.zip
name: ManagedPasswordFilter
deploy:
- provider: GitHub
release: ManagedPasswordFilter-v$(appveyor_build_version)
tag: v$(appveyor_build_version)
description: 'This is an automated deployment'
auth_token:
secure: 7a77d903616def12df02a7c3c5f1e1f4cf077eb8 # your encrypted token from GitHub
artifact: installer # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only
after_deploy:
ps: |
Write-Host "'after_deploy' block"
on_finish:
- ps: |
Write-Host "'on_finish' block"
$blockRdp = $true
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))