forked from artiomchi/FlexLabs.Upsert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.signed.yml
77 lines (62 loc) · 2.74 KB
/
appveyor.signed.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
version: 1.0.0.{build}
image: Visual Studio 2022
configuration: Release
skip_tags: true
services:
- mssql2017
- mysql
- postgresql13
environment:
skey_secret:
secure: tZ1CLa1H+KzjeZAks/d3fkM3mp7ymDd0hnSmmKa+qe19K1kW2Tt+hMt38tNFMpJIYaOBSAcQ7bwvvqFQwVFNXA==
cert_secret:
secure: nFN7E/nsmj883zdZUmI+ogZaoqRNxSpOSWI8aPIcVLUiLkhzi49t8uXn7NwTfexi
certsig_pass:
secure: QsY8DnmkVvF6DMhHtqSZNmjiMPy229LGG9GEVwo1btrkw7KXN7A8tB5sMaeV8bUL
init:
- ps: $Env:VersionSuffixParam = "--version-suffix"
- ps: $Env:VersionSuffixValue = ("ci-" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))
install:
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- ps: Invoke-WebRequest https://ca.flexlabs.org/root.crt -UseBasicParsing -OutFile root.crt
- ps: Import-Certificate .\root.crt -CertStoreLocation Cert:\LocalMachine\Root\
- ps: appveyor-tools\secure-file -decrypt certs\FlexLabsStrongKey.snk.enc -secret $Env:skey_secret
- ps: appveyor-tools\secure-file -decrypt certs\codesig.pfx.enc -secret $Env:cert_secret
- ps: Import-PfxCertificate -FilePath certs\codesig.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString $Env:certsig_pass -AsPlainText -Force)
before_build:
- ps: 'Write-Output ("Build version suffix: " + $Env:VersionSuffixValue)'
- ps: dotnet --info
- ps: dotnet restore -v Minimal
build_script:
- ps: $Env:PATH = $Env:PATH + ";C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\"
- ps: dotnet build --no-restore -c $Env:CONFIGURATION $Env:VersionSuffixParam $Env:VersionSuffixValue
- ps: dotnet pack --no-build -c $Env:CONFIGURATION $Env:VersionSuffixParam $Env:VersionSuffixValue
- ps: dir -rec *.nupkg | foreach { nuget sign $_ -CertificateSubjectName "Artiom Chilaru" -Timestamper "https://timestamp.digicert.com" }
test_script:
- ps: dotnet test --no-build -c $Env:CONFIGURATION
artifacts:
- path: '**\*.nupkg'
for:
- branches:
only:
- develop
deploy:
- provider: NuGet
server: https://www.myget.org/F/artiomchi/api/v2/package
symbol_server: https://www.myget.org/F/artiomchi/symbols/api/v2/package
api_key:
secure: BlCFbX6MZpsBFqMRZHGultlTjjW8N7fwApHSx/AidToI+nIVCGb5G0yJ3+faCHbc
artifact: /.*\.nupkg/
- branches:
only:
- /feature\/.*/
init:
- ps: $Env:VersionSuffixParam = "--version-suffix"
- ps: $Env:VersionSuffixValue = ("ci--" + $Env:APPVEYOR_REPO_BRANCH.Substring(8) + "-" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))
deploy:
- provider: NuGet
server: https://www.myget.org/F/artiomchi/api/v2/package
symbol_server: https://www.myget.org/F/artiomchi/symbols/api/v2/package
api_key:
secure: BlCFbX6MZpsBFqMRZHGultlTjjW8N7fwApHSx/AidToI+nIVCGb5G0yJ3+faCHbc
artifact: /.*\.nupkg/