unitysetup.powershell/appveyor.yml

40 строки
1.3 KiB
YAML

version: '{build}'
skip_tags: true
pull_requests:
do_not_increment_build_number: true
install:
- ps: >-
$ErrorActionPreference = 'Stop'
Install-PackageProvider -Name NuGet -Force
Remove-Module 'PowerShellGet' -Force -ErrorAction SilentlyContinue -Verbose
Install-Module 'PowerShellGet' -Scope CurrentUser -Force -AllowClobber -Verbose
Install-Module 'powershell-yaml' -Scope CurrentUser -Force -AllowClobber -Verbose
Install-Module 'Az.Accounts' -RequiredVersion 2.15.1 -Scope CurrentUser -Force -AllowClobber -Verbose
build_script:
- ps: .\build.ps1 -Revision "$env:APPVEYOR_BUILD_NUMBER" -Suffix "$env:APPVEYOR_REPO_BRANCH"
deploy_script:
- ps: >-
$publish = Start-Process 'powershell' -Wait -PassThru -RedirectStandardError .\deploy_error.log -RedirectStandardOutput .\deploy_out.log { Publish-Module -Path .\UnitySetup -NugetAPIKey $env:NugetAPIKey -Verbose }
Get-Content .\deploy_output.log -ErrorAction SilentlyContinue | Write-Host
Get-Content .\deploy_error.log -ErrorAction SilentlyContinue | Write-Host -ForegroundColor Red
if( $publish.ExitCode -ne 0 ) { Write-Error "Publish step failed - see above logs"}
for:
-
branches:
only:
- master
build_script:
- ps: .\build.ps1 -Revision "$env:APPVEYOR_BUILD_NUMBER"
-
branches:
only:
- develop