/
appveyor.yml
49 lines (48 loc) · 2.05 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
image: Visual Studio 2017
init:
- ps: |
if ($Env:APPVEYOR_REPO_TAG -eq 'true') { Update-AppveyorBuild -Version "$Env:APPVEYOR_REPO_TAG_NAME" }
else { Update-AppveyorBuild -Version "dev-$($Env:APPVEYOR_REPO_COMMIT.Substring(0, 7))" }
install:
- ps: .paket\paket.exe install
configuration: Release
build:
parallel: true
after_build:
- ps: |
$project = $Env:APPVEYOR_PROJECT_NAME
$name = "$project-$Env:APPVEYOR_BUILD_VERSION.zip"
$dir = ".\$project\bin\$Env:CONFIGURATION"
7z a $name "$dir\$project.exe" "$dir\$project.exe.config" "$dir\CommandLine.dll" "$dir\LxssFileSystem.dll" "$dir\ICSharpCode.SharpZipLib.dll" "$dir\SharpCompress.dll" 'LICENSE' 'LICENSE-3RD-PARTY'
if ($Env:APPVEYOR_REPO_TAG -eq 'true') {
$hash = (Get-FileHash $name -Algorithm SHA256).Hash
$version = $Env:APPVEYOR_REPO_TAG_NAME.Substring(1)
cd choco
(cat "$project.nuspec") -replace '{VERSION}', $version | sc "$project.nuspec" -Encoding Ascii
(cat tools\chocolateyInstall.ps1) -replace '{VERSION}', $version | sc tools\chocolateyInstall.ps1 -Encoding Ascii
(cat tools\chocolateyInstall.ps1) -replace '{CHECKSUM}', $hash | sc tools\chocolateyInstall.ps1 -Encoding Ascii
choco pack
}
artifacts:
- path: '*.zip'
- path: choco\*.nupkg
deploy:
- provider: GitHub
artifact: /.*\.zip/
description: |
**Release Notes**
- Rewrite tar extraction and directory copying. Support `.tar` and `.tar.xz` files.
- Add the `install -r` option to support tar files with preceding directories.
- Add the `duplicate` option.
- Fix an error message in `UninstallDistro`.
auth_token:
secure: saJApLHQjPJ+XmMy3Qk+khAvfIKI4dveBtSnUESRX14qpUy3WPlhM97Ixbja/Tjg
on:
appveyor_repo_tag: true
- provider: NuGet
artifact: /.*\.nupkg/
server: https://push.chocolatey.org/
api_key:
secure: Vo2L43MTVd1m6V60iP3G2B1MiAzLjnriIjlkD/B9SUJCRM/6HH5E1jbxyg7MmtB0
on:
appveyor_repo_tag: true