-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathappveyor.yml
More file actions
40 lines (40 loc) · 2.57 KB
/
appveyor.yml
File metadata and controls
40 lines (40 loc) · 2.57 KB
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
version: '{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
image: Visual Studio 2019
environment:
nodejs_version: "12"
ftp_password:
secure: Rpm6L2WNHaHleLVg3Yl4hRwLnxAD6+HYpPMQdsHdZ58=
install:
- ps: "# Ensures that .net core is up to date.\n # first get the required version from global.json\n $json = ConvertFrom-Json (Get-Content \"C:\\projects\\casemanagement\\global.json\" -Raw)\n $required_version = $json.sdk.version\n\n # Running dotnet --version stupidly fails if the required SDK version is higher \n # than the currently installed version. So move global.json out the way \n # and then put it back again \n Rename-Item \"C:\\projects\\casemanagement\\global.json\" \"C:\\projects\\casemanagement\\global.json.bak\"\n $current_version = (dotnet --version)\n Rename-Item \"C:\\projects\\casemanagement\\global.json.bak\" \"C:\\projects\\casemanagement\\global.json\"\n Write-Host \"Required .NET version: $required_version Installed: $current_version\"\n\n if ($current_version -ne $required_version) {\n # Current installed version is too low.\n # Install new version as a local only dependency. \n $urlCurrent = \"https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$required_version/dotnet-sdk-$required_version-win-x64.zip\"\n Write-Host \"Installing .NET Core $required_version from $urlCurrent\"\n $env:DOTNET_INSTALL_DIR = \"C:\\Program Files\\dotnet\\sdk\\$required_version\"\n New-Item -Type Directory C:\\dotnettmp -Force | Out-Null\n (New-Object System.Net.WebClient).DownloadFile($urlCurrent, \"dotnet.zip\")\n Write-Host \"Unzipping to C:\\dotnettmp\"\n Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory(\"dotnet.zip\", \"C:\\dotnettmp\")\n Move-Item -Path \"C:\\dotnettmp\\sdk\\$required_version\" -Destination \"C:\\Program Files\\dotnet\\sdk\\\"\n }\nUpdate-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)"
nuget:
disable_publish_on_pr: true
build_script:
- cmd: .\psake.cmd ci
test: off
artifacts:
- path: build\results\*.nupkg
name: NuGet
- path: build\results\services\**\*.*
name: Services
deploy:
- provider: NuGet
server: https://www.myget.org/F/advance-ict/api/v2/package
api_key:
secure: zs1JVjFHRdvB36fGq2rN8MR7QeJnCVkt7VTG4ZHT5OYDNpuh2AlGHqK+rseevn8l
skip_symbols: true
artifact: /.*\.nupkg/
on:
branch: master
- provider: NuGet
name: production
artifact: /.*\.nupkg/
api_key:
secure: ppwdCVQ3Ue4Msodk0VafBwlpujkDBddjGg7okIRojYiVFhVD6fhd7ERijm3RzSGD
on:
branch: master
appveyor_repo_tag: true