-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
68 lines (48 loc) · 2.25 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
version: 3.6.{build}
branches:
only:
- master
skip_tags: true
skip_commits:
files:
- SimpleZIP_UI/Assets/*
- .gitattributes
- .gitignore
- LICENSE.md
- README.md
image: Visual Studio 2022
environment:
secret_storeKey:
secure: iGyhcOxgR6HeJ2sNLrgqSdF5u0ux+m2K+fb4pWF8xgE=
secret_storeAssociation:
secure: xjfRZSCdwPQ+BEUp5WI8umiNB9VdpPSQ6H5HvFpvEPI=
secret_testTempKey:
secure: MwhPsHlpRf0zVmlCt1V+RRBbzg2h0j+cqHvz3jYXQsA=
secret_testCertKey:
secure: 9zhloNvLfpwrL+X3Z/surgvJ2WtGGBq64jpS0394FpE=
install:
- cmd: >-
nuget install secure-file -ExcludeVersion
secure-file\tools\secure-file -decrypt SimpleZIP_UI\SimpleZIP_UI_StoreKey.pfx.enc -secret %secret_storeKey%
secure-file\tools\secure-file -decrypt SimpleZIP_UI\Package.StoreAssociation.xml.enc -secret %secret_storeAssociation%
secure-file\tools\secure-file -decrypt SimpleZIP_UI_TEST\SimpleZIP_UI_TEST_TemporaryKey.pfx.enc -secret %secret_testTempKey%
build_script:
- ps: >-
Add-Type -AssemblyName System.Security
Write-Host "Downloading latest Nuget executable..."
appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
Write-Host "Downloaded" -ForegroundColor green
Write-Host "Performing Nuget restore..."
appveyor-retry nuget restore
Write-Host "Restore complete" -ForegroundColor green
Write-Host "Importing protected certificates into store..."
$pfxPath = "C:\projects\simplezip\SimpleZIP_UI_TEST\SimpleZIP_UI_TEST_TemporaryKey.pfx"
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import($pfxPath, $env:secret_testCertKey, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"PersistKeySet")
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store -argumentlist "MY", CurrentUser
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"ReadWrite")
$store.Add($cert)
$store.Close()
Write-Host "Certificates imported." -ForegroundColor green
Write-Host "Starting to build using MSBuild..."
msbuild "C:\projects\simplezip\SimpleZIP_UI.sln" /t:Build /p:Configuration=Debug /p:Platform=x86 /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"