forked from ffMathy/Shapeshifter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
103 lines (99 loc) · 5.71 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: 1.0.0.{build}
environment:
code_signing_password:
secure: bn6XW8obH7l9TqBmBbmn5Q/yQLKaAR3xwqb1rOGSEJ+LlHgt3zfMw81HQcWK6Z8h
webdeploy_password:
secure: 5Urzbp6Aj24/wHED9+Q/CtH4EjN7nv9PGdCdBDr5XECq8wnDxQcHK5YoS246hOqcEBNCU2OZ4rq26LVWCRbfbw==
patreon_client_id:
secure: XbNZa+N6W6ODv7Y2Tkf6ZR9nNpBkqlB7k5aLTtBRF0YcsFy/49pIVYQpKCK+HRhniF+DEmyMsGPwTUry9qrenI3c93dLnSQvAolKBH0YIeE=
patreon_client_secret:
secure: 7j+7Tcf0cjqkaY/WX1TqP4y65RI9n8oWu98LyI4y98ShrJ02GMGoVUemhyw35xTVp9jfVizPphnLYB49OMShmcuO+5mDYSkZD5M+typnB40=
patreon_creators_access_token:
secure: WTlmus0dhKgzKKtcNjBpT0k2jrBKSBE8Q3LJC6zjpUghnjzH1d7fIJXdWLXW1DAi
patreon_creators_refresh_token:
secure: c3EVYJ14R2JBDQgk6quSdHkcFMjtN2msgn2F4SRFjqdKVvRI4qkrU58ftCsZMB0g
gren_token:
secure: NdaCVjPIdd6UghkTaEJ1oNbh0ukOoPKMC4K+B4XnrGG1xEcYSIw63+25O+pTQA3T
issue_reporter_token:
secure: QfLm+3QNQHOvSlRkiScVRSDZ3a7cL4JfiqTDK2DsV3Pl+M/L3drNQrAkGhhg4e+r
pull_requests:
do_not_increment_build_number: false
skip_tags: true
image: Visual Studio 2017
configuration: Debug
platform: x64
skip_branch_with_pr: true
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
init:
- ps: |
Update-AppveyorBuild -Version "6.$(Get-Date -format yyyy).$(Get-Date -format Mdd).$((Get-ChildItem Env:APPVEYOR_BUILD_NUMBER).Value)"
after_build:
- ps: |
copy build\application\Shapeshifter.pdb src\Shapeshifter.WindowsDesktop\App.pdb
Remove-Item "build\application\*.*"
cd src\Shapeshifter.WindowsDesktop
msbuild Shapeshifter.WindowsDesktop.csproj
cd ..\..\
$fileSize = (Get-Item build\application\Shapeshifter.exe).Length
(Get-Content build\pad.xml).Replace('{{VERSION}}', "6.$(Get-Date -format yyyy).$(Get-Date -format Mdd).$((Get-ChildItem Env:APPVEYOR_BUILD_NUMBER).Value)") | Set-Content build\pad.xml
(Get-Content build\pad.xml).Replace('{{RELEASE_MONTH}}', "$(Get-Date -format MM)") | Set-Content build\pad.xml
(Get-Content build\pad.xml).Replace('{{RELEASE_DAY}}', "$(Get-Date -format dd)") | Set-Content build\pad.xml
(Get-Content build\pad.xml).Replace('{{RELEASE_YEAR}}', "$(Get-Date -format yyyy)") | Set-Content build\pad.xml
(Get-Content build\pad.xml).Replace('{{FILE_SIZE_BYTES}}', "$($fileSize)") | Set-Content build\pad.xml
(Get-Content build\pad.xml).Replace('{{FILE_SIZE_KILOBYTES}}', "$($fileSize/1024)") | Set-Content build\pad.xml
(Get-Content build\pad.xml).Replace('{{FILE_SIZE_MEGABYTES}}', "$($fileSize/1024/1024)") | Set-Content build\pad.xml
mkdir build\website
cd src\Shapeshifter.Website
dotnet restore Shapeshifter.Website.csproj
dotnet build Shapeshifter.Website.csproj
dotnet publish --output "..\..\build\website"
cd ..\..\
before_build:
- cmd: |
cd src
nuget restore Shapeshifter.sln
cd ..\
build:
project: src\Shapeshifter.sln
verbosity: normal
artifacts:
- path: build\application\Shapeshifter.exe
name: Application
- path: build\pad.xml
name: PAD
deploy:
- provider: GitHub
release: shapeshifter-v$(appveyor_build_version)
description: 'Changelog is still being developed. It will be available in a few minutes.'
artifact: Application,PAD
prerelease: true
auth_token:
secure: ayEVarC+QEZFXazImnX3hY26ZG4O5xIqH1QPzn9eYbHmglTppws2bsqK8x8mrzEH
on:
branch: master
install:
- ps: Install-Product node ''
before_deploy:
- cmd: |
cd build\application
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86\signtool.exe" sign /f "..\signing.pfx" /fd SHA256 /p "%code_signing_password%" /d "Shapeshifter" /du "https://shapeshifter.app/" /tr "http://timestamp.comodoca.com/authenticode" /v "Shapeshifter.exe"
cd ..\..\
after_deploy:
- cmd: |
npm install github-release-notes -g
gren release --token=%gren_token% --override --prerelease
cd build\website
del secrets.json /F
echo { "patreon": { "clientId": "%patreon_client_id%", "clientSecret": "%patreon_client_secret%", "creatorsAccessToken": "%patreon_creators_access_token%", "creatorsRefreshToken": "%patreon_creators_refresh_token%" }, "github": { "token": "%issue_reporter_token%" } }>> secrets.json
7z a Website.zip *
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -enablerule:AppOffline -verb=sync -source:package="Website.zip" -dest:auto,computerName=https://shapeshifter.scm.azurewebsites.net:443/msdeploy.axd?site=shapeshifter,userName=$shapeshifter,password=%webdeploy_password%,authType=basic -allowUntrusted=true -skip:Directory="App_Data"
test_script: |
nuget install opencover -ExcludeVersion -OutputDirectory %APPVEYOR_BUILD_FOLDER%\tools
%APPVEYOR_BUILD_FOLDER%\tools\OpenCover\tools\OpenCover.Console.exe -output:"coverage1.xml" -target:"vstest.console.exe" -targetargs:"/logger:Appveyor \"%APPVEYOR_BUILD_FOLDER%\build\tests\Shapeshifter.Tests.dll\" /TestCaseFilter:(TestCategory!=Integration&TestCategory!=Predeploy)" -excludebyattribute:*ExcludeFromCodeCoverage* -register:user -skipautoprops -returntargetcode
%APPVEYOR_BUILD_FOLDER%\tools\OpenCover\tools\OpenCover.Console.exe -output:"coverage2.xml" -target:"vstest.console.exe" -targetargs:"/logger:Appveyor \"%APPVEYOR_BUILD_FOLDER%\build\tests\Shapeshifter.Tests.dll\" /TestCaseFilter:\"TestCategory=Integration\"" -excludebyattribute:*ExcludeFromCodeCoverage* -register:user -skipautoprops -returntargetcode
%APPVEYOR_BUILD_FOLDER%\tools\OpenCover\tools\OpenCover.Console.exe -output:"coverage3.xml" -target:"vstest.console.exe" -targetargs:"/logger:Appveyor \"%APPVEYOR_BUILD_FOLDER%\build\tests\Shapeshifter.Tests.dll\" /TestCaseFilter:\"TestCategory=Predeploy\"" -excludebyattribute:*ExcludeFromCodeCoverage* -register:user -skipautoprops -returntargetcode