BililiveRecorder/appveyor.yml
2018-03-25 11:24:34 +08:00

86 lines
2.0 KiB
YAML

image: Visual Studio 2017
version: Oops{build}
branches:
only:
- dev
platform: Any CPU
configuration:
- Debug
#- Release
init:
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):x-oauth-basic@github.com`n"
- git config --global user.email "appveyor@genteure.com"
- git config --global user.name "Appveyor(Genteure)"
- git config --global core.autocrlf false
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:p_version="$($env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")).0"
Update-AppveyorBuild -Version "$env:p_version"
}
else
{
$env:p_version="0.0.0.$env:APPVEYOR_BUILD_NUMBER"
Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0, 7))-$env:APPVEYOR_BUILD_NUMBER"
}
- ps: Write-Host "Current build version is $env:p_version"
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(p_version)
assembly_file_version: $(p_version)
assembly_informational_version: $(p_version)
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: $(p_version)
package_version: $(p_version)
assembly_version: $(p_version)
file_version: $(p_version)
informational_version: $(p_version)
before_build:
- nuget restore
- dotnet restore
artifacts:
- path: BililiveRecorder.WPF\bin\Debug
name: BililiveRecorderDebugBuild
environment:
github_access_token:
secure: 3n2WMbrqWb0nmy2LBmu7w6dJltiHHC4LCoNuIKBh7fKV0xfxCwVGOxbTpunLI2pe
cache:
- packages
build:
verbosity: minimal
after_build:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
./CI/build_clickonce.ps1
./CI/push_clickonce.ps1
}
# after_deploy:
# clone soft.danmuji.org
# copy files
# - git commit ...
# - git push ...
# TODO: Github Release
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))