forked from simpleidserver/SimpleIdServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
38 lines (38 loc) · 2.8 KB
/
Copy pathappveyor.yml
File metadata and controls
38 lines (38 loc) · 2.8 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
version: '{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
image: Visual Studio 2022
environment:
nodejs_version: "12"
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\\simpleidserver\\global.json\" -Raw)\n$required_version = $json.sdk.version\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\nRename-Item \"C:\\projects\\simpleidserver\\global.json\" \"C:\\projects\\simpleidserver\\global.json.bak\"\n$current_version = (dotnet --version)\nRename-Item \"C:\\projects\\simpleidserver\\global.json.bak\" \"C:\\projects\\simpleidserver\\global.json\"\nWrite-Host \"Required .NET version: $required_version Installed: $current_version\"\nif ($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}\n\nUpdate-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)\nImport-Certificate -FilePath \"C:\\projects\\simpleidserver\\certificates\\simpleIdServerClient.crt\" -CertStoreLocation cert:\\LocalMachine\\Root\nImport-Certificate -FilePath \"C:\\projects\\simpleidserver\\certificates\\simpleIdServerClient.crt\" -CertStoreLocation cert:\\CurrentUser\\Root \n Install-Module VSSetup -Scope CurrentUser"
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: YxYVFFNdgFPI6atwwV80ZBy/waXfipraBVGfE+huQEj4ItqfNJDHnX8q8R4Fybse
on:
branch: master
appveyor_repo_tag: true