-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
appveyor.yml
59 lines (47 loc) · 1.78 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
version: 1.1.{build}
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: $(app_version)
package_version: $(app_version)
assembly_version: $(app_version}
file_version: $(app_version)
informational_version: $(app_version)
cache:
- '%APPDATA%\npm'
install:
- npm install -g semantic-release@15
- ps: |
semantic-release --dry-run | %{
echo $_
$fields = -split $_;
if ($fields[0] -eq "#" -or $fields[0] -eq "##") {
Set-Variable -Name "app_version" -Value $fields[1]
}
}
if ($app_version -eq $null)
{
Set-Variable -Name "app_version" -Value 0.0.1
}
echo "Version is $app_version version is $version build is $build"
build_script:
- cmd: dotnet publish -f netcoreapp2.1 -r win-x64
- cmd: copy LICENCE LICENSE.txt
- ps: echo "Original files can be found at https://github.com/TwoTenPvP/UnityPackager/releases" > VERIFICATION.txt
- ps: Get-Filehash UnityPackager\bin\Debug\netcoreapp2.1\win-x64\publish\*.* >> VERIFICATION.txt
- ps: choco pack --verbose --version=$app_version
after_build:
- 7z a UnityPackager.zip UnityPackager\bin\Debug\netcoreapp2.1\win-x64\publish\*.*
artifacts:
- path: UnityPackager.zip
test_script:
- cmd: dotnet test -f netcoreapp2.1
- cmd: choco install unitypackager -s .
deploy_script:
- semantic-release
- ps: if ($app_version -ne "0.0.1" -and $env:CHOCO_KEY ) { choco push --source https://chocolatey.org/ -k $env:CHOCO_KEY }
skip_tags: true
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))