Skip to content

Commit ec8c3ea

Browse files
authored
Merge pull request #25 from mast-eu/CombineArtifacts
Combine artifacts for signing
2 parents 3dad53b + 68711ba commit ec8c3ea

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

appveyor.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,31 @@ build_script:
4747
test_script:
4848
- ps: .\tools\Run-Tests.ps1
4949

50+
after_test:
51+
- ps: |
52+
# do not sign artifacts for PR to release branches, publish dev builds instead
53+
if ($env:APPVEYOR_PULL_REQUEST_TITLE) {
54+
Write-Host "[INFO]: Do not sign artifacts from PR to release branch"
55+
Get-ChildItem GitExtensions.PluginManager*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
56+
Get-ChildItem GitExtensions.PluginManager*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
57+
Exit-AppVeyorBuild
58+
return
59+
}
60+
else {
61+
Write-Host "[INFO]: Prepare combined artifact for signing on release branch"
62+
Write-Host "Creating combined build artifact ..."
63+
$nupkg = (Resolve-Path .\GitExtensions.PluginManager*.nupkg)[0].Path;
64+
$zip = (Resolve-Path .\GitExtensions.PluginManager*.zip)[0].Path;
65+
$combined = ".\GitExtensions.PluginManager.$($env:APPVEYOR_BUILD_VERSION)$($env:version_suffix).combined-unsigned.zip"
66+
Compress-Archive -LiteralPath $nupkg, $zip -CompressionLevel NoCompression -DestinationPath $combined -Force
67+
}
68+
5069
#---------------------------------#
5170
# artifacts configuration #
5271
#---------------------------------#
5372

5473
artifacts:
55-
- path: .\*.zip
56-
- path: .\*.nupkg
74+
- path: .\GitExtensions.PluginManager.*.combined-unsigned.zip
5775

5876
#---------------------------------#
5977
# deployment configuration #
@@ -63,7 +81,7 @@ deploy:
6381
- provider: Webhook
6482
on:
6583
ARTIFACT_SIGNING_ENABLED: true
66-
url: https://app.signpath.io/API/v1/7c19b2cf-90f7-4d15-9b12-1b615f7c18c4/Integrations/AppVeyor?SigningPolicyId=8a4ce84a-78d1-4fc0-8c0c-7cd51fb108c0
84+
url: https://app.signpath.io/API/v1/7c19b2cf-90f7-4d15-9b12-1b615f7c18c4/Integrations/AppVeyor?SigningPolicyId=cae0b405-4eda-43db-b19e-7e47faa929e0
6785
on_build_success: true
6886
on_build_failure: false
6987
on_build_status_changed: false

0 commit comments

Comments
 (0)