forked from OpportunityLiu/E-Viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
70 lines (50 loc) · 1.78 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
version: Build - {build}
skip_tags: true
image: Visual Studio 2017
configuration: Release
platform:
- x86
- x64
- ARM
environment:
GITHUB_USER: OpportunityLiu
GITHUB_PASS:
secure: jamZ7Amcuj5QZeiKqfmrig==
install:
- ps: >-
$pfxpath = "${Env:APPVEYOR_BUILD_FOLDER}/ExViewer/ExViewer_TemporaryKey.pfx"
$password = $Env:GITHUB_PASS
Add-Type -AssemblyName System.Security
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import($pfxpath, $password, [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()
before_build:
- ps: >-
nuget restore
$NugetPackage = nuget locals global-packages -list
$NugetPackage = $NugetPackage.SubString(17)
$ToolVersions = (Get-ChildItem (Join-Path $NugetPackage 'Opportunity.ResourceGenerator') | Sort-Object Name -Descending)[0]
$ToolPath = Join-Path $ToolVersions.FullName '/tools/Opportunity.ResourceGenerator.Generator.exe'
&$ToolPath "$Env:APPVEYOR_BUILD_FOLDER/ExViewer.sln"
@"
namespace ExViewer { class Github {
public const string BRANCH = "${Env:APPVEYOR_REPO_BRANCH}";
public const string COMMIT = "${Env:APPVEYOR_REPO_COMMIT}";
}}
"@ > $Env:APPVEYOR_BUILD_FOLDER/ExViewer/Github.cs
build:
verbosity: minimal
artifacts:
- path: /ExViewer/AppPackages/*/*.appx*
- path: /ExViewer/AppPackages/*/*.cer
deploy:
- provider: GitHub
auth_token:
secure: IsMNo4t2eagMYlnJeueWImMY3HznseoxPeJRxCby4BqmwVdstnxAwuNRhJnhk7lJ
draft: true
force_update: true
on:
branch: master