-
Notifications
You must be signed in to change notification settings - Fork 21
/
appveyor.yml
102 lines (86 loc) · 3.41 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
#nuget version is only changed by RELEASE TAG
version: 7.0.0-dev-{build}
image: Visual Studio 2022
# Set the signing policy slug according to branch
environment:
SIGNPATH_SIGNING_POLICY_SLUG: test-signing
ARTIFACT_CONFIGURATION_SLUG: o2p2
SIGNPATH_PROJECT_SLUG : odata2poco
pull_requests:
do_not_increment_build_number: false
init:
- ps: |
git config --global core.autocrlf input
$env:CAN_PUBLISH = $true
$env:O2P_VERSION = $env:APPVEYOR_BUILD_VERSION
Write-Host "APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
if ($env:APPVEYOR_REPO_TAG -eq "true") {
$env:SIGNPATH_SIGNING_POLICY_SLUG = 'release-signing'
$ver = $env:APPVEYOR_REPO_TAG_NAME
if($ver.StartsWith("v") -eq $true) {
$ver = $ver.Substring(1)
$env:O2P_VERSION = $ver
}
try
{
Update-AppveyorBuild -Version $ver
Write-Host "Update-AppveyorBuild Success to change version to TAG: '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Green
}
catch
{
Write-Host "Update-AppveyorBuild Fail to change version to TAG: '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Red
Write-Host "Exception Error: $PSItem.Exception.Message" -ForegroundColor Red
$env:CAN_PUBLISH = $false
}
}
- ps: |
Write-Host "APPVEYOR_BUILD_VERSION='$env:APPVEYOR_BUILD_VERSION'" -ForegroundColor Yellow
Write-Host "APPVEYOR_REPO_TAG_NAME= '$env:APPVEYOR_REPO_TAG_NAME'" -ForegroundColor Yellow
configuration: Release
skip_commits:
files:
- docs/*
- art/*
- '**/*.md'
- .gitignore
- .editorconfig
message: /updated readme.*|update readme.*s|update docs.*|update version.*|update changelog.*/
build_script:
- cmd: dotnet build OData2Poco.sln -c Release --version-suffix %APPVEYOR_BUILD_VERSION%
test_script:
- cmd: dotnet test OData2Poco.Tests/
- cmd: dotnet test OData2Poco.CommandLine.Test/
after_test:
- cmd: dotnet pack OData2Poco.CommandLine/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION%
- cmd: dotnet pack OData2Poco.dotnet.o2pgen/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION%
- cmd: dotnet pack OData2PocoLib/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION%
- ps: |
$version=$env:APPVEYOR_BUILD_VERSION
$allow_push=$env:APPVEYOR_REPO_TAG -eq "true"
.\scripts\build_choco $version $allow_push
- ps: .\scripts\checksum.ps1 $env:APPVEYOR_BUILD_VERSION
- 7z a -tzip .\build\odata2poco-%O2P_VERSION%-unsigned.zip .\build\*.nupkg .\build\*.exe .\chocolatey\*.nupkg
- ps: |
pushd .\build
$source="https://www.myget.org/F/odata2poco/api/v3/index.json"
$key=$env:MYGET_KEY
nuget push *.nupkg -Source $source -ApiKey $key
popd
artifacts:
- path: .\build\odata2poco-%O2P_VERSION%-unsigned.zip
name: o2p_zip
deploy:
#Github
- provider: GitHub
auth_token:
secure: sB33uLo96nR+LGmYLdPmY/segb6d4O061N2e8Nbz6iyHg82D0RysMxWE5JKnXmU+
artifact: o2p_zip
prerelease: false
draft: true
on:
APPVEYOR_REPO_TAG: true
- provider: Webhook
url: https://app.signpath.io/API/v1/%SIGNPATH_ORGANIZATION_ID%/Integrations/AppVeyor?ProjectSlug=%SIGNPATH_PROJECT_SLUG%&SigningPolicySlug=%SIGNPATH_SIGNING_POLICY_SLUG%&ArtifactConfigurationSlug=%ARTIFACT_CONFIGURATION_SLUG%
authorization: 'Bearer %SIGNPATH_CI_USER_TOKEN%'
on:
APPVEYOR_REPO_TAG: true