-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
78 lines (63 loc) · 2.31 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
#nuget version is only changed by RELEASE TAG
version: 1.1.0-dev-{build}
image: Visual Studio 2022
pull_requests:
do_not_increment_build_number: true
# Set the signing policy slug according to branch
environment:
SIGNPATH_SIGNING_POLICY_SLUG: release-signing
ARTIFACT_CONFIGURATION_SLUG: appvey
SIGNPATH_PROJECT_SLUG : appvey
init:
- ps: |
git config --global core.autocrlf input
$env:CAN_PUBLISH = $true
if ($env:APPVEYOR_REPO_TAG -eq "true") {
$ver = $env:APPVEYOR_REPO_TAG_NAME
if($ver.StartsWith("v") -eq $true) { $ver = $ver.Substring(1) }
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
- ps: dotnet --version
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: cd src
- cmd: dotnet build appvey.sln -c Release --version-suffix %APPVEYOR_BUILD_VERSION%
test_script:
- cmd: dotnet test AppVeyorCli.Test/
after_test:
- cmd: dotnet pack AppVeyor.Cli/ -c Release --version-suffix %APPVEYOR_BUILD_VERSION%
artifacts:
- path: .\nupkg\*.nupkg
name: global_tool
deploy:
- provider: GitHub
auth_token: $(GH_TOKEN)
prerelease: false
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