|
1 | 1 | version: 1.0.{build} |
2 | | -image: Visual Studio 2017 |
| 2 | +image: Visual Studio 2019 |
3 | 3 | configuration: Release |
4 | 4 | environment: |
5 | 5 | CODECOV_TOKEN: 875a7530-b25b-49e9-a2ba-fe8b7a80cc6b |
6 | 6 |
|
| 7 | +# Cache chocolatey packages and Nuget packages. Nuget package cache is invalidated |
| 8 | +# on any change to a project file, the choco cache on any change to the config |
| 9 | +# nuget file. |
| 10 | +cache: |
| 11 | + - SharpShell/packages -> **/*.csproj |
| 12 | + - C:/ProgramData/chocolatey/bin -> ./SharpShell/config.ps1 |
| 13 | + - C:/ProgramData/chocolatey/lib -> ./SharpShell/config.ps1 |
| 14 | + |
7 | 15 | # Before building, restore Nuget packages and install dependencies. |
8 | 16 | before_build: |
9 | | -- ps: | |
10 | | - nuget restore SharpShell\SharpShell.sln |
11 | | - .\SharpShell\config.ps1 |
| 17 | + - ps: | |
| 18 | + nuget restore SharpShell/SharpShell.sln |
| 19 | + ./SharpShell/config.ps1 |
12 | 20 |
|
13 | | -build: |
14 | | - project: SharpShell\SharpShell.sln |
15 | | - publish_nuget: true |
16 | | - verbosity: minimal |
| 21 | +# Use our own build script. |
| 22 | +build_script: |
| 23 | + - ps: | |
| 24 | + ./SharpShell/build.ps1 |
| 25 | + ./SharpShell/pack.ps1 |
| 26 | +# After the build as completed, analyse coverage and upload. |
| 27 | +on_success: |
| 28 | + - ps: ./SharpShell/coverage.ps1 |
17 | 29 |
|
18 | 30 | # Before packaging, zip up the tools. |
19 | 31 | before_package: |
20 | | -- ps: | |
21 | | - 7z a ServerManager.zip C:\projects\sharpshell\SharpShell\Tools\ServerManager\bin\Release\* |
22 | | - 7z a ServerRegistrationManager.zip C:\projects\sharpshell\SharpShell\Tools\ServerRegistrationManager\bin\Release\* |
| 32 | + - ps: | |
| 33 | + 7z a ServerManager.zip C:/projects/sharpshell/SharpShell/Tools/ServerManager/bin/Release/* |
| 34 | + 7z a ServerRegistrationManager.zip C:/projects/sharpshell/SharpShell/Tools/ServerRegistrationManager/bin/Release/* |
23 | 35 |
|
24 | 36 | # Track our artifacts. |
25 | 37 | artifacts: |
26 | | -- path: ServerManager.zip |
27 | | - name: ServerManager |
28 | | -- path: ServerRegistrationManager.zip |
29 | | - name: ServerRegistrationManager |
30 | | -- path: SharpShell\artifacts |
31 | | - name: artifacts |
| 38 | + - path: ServerManager.zip |
| 39 | + name: ServerManager |
| 40 | + - path: ServerRegistrationManager.zip |
| 41 | + name: ServerRegistrationManager |
| 42 | + - path: SharpShell/artifacts |
| 43 | + name: artifacts |
| 44 | + - path: './source/**/*.nupkg' |
32 | 45 |
|
33 | 46 | # Deploy to Nuget and GitHub Releases. |
34 | 47 | deploy: |
35 | | -- provider: NuGet |
36 | | - api_key: |
37 | | - secure: TWio+nDN8Ew7+OH7J3tLcEoM6DmxrIwfAr+2Ag8ROWJUEnXyoSAZ/I1GxBgB0qMd |
38 | | - on: |
39 | | - APPVEYOR_REPO_TAG: true |
40 | | -- provider: GitHub |
41 | | - auth_token: |
42 | | - secure: KTWUORrnJKPKLSf/3ROLY50T9UfgTMnKHf3OjBOv8tlY/DAxtlglRU3eM+j45fMt |
43 | | - artifact: SharpShell.*.nupkg, ServerRegistrationManager.*.nupkg, ServerManager.zip, ServerRegistrationManager.zip |
44 | | - on: |
45 | | - APPVEYOR_REPO_TAG: true |
46 | | - |
47 | | -# After the build as completed, analyse coverage and upload. |
48 | | -on_success: |
49 | | -- ps: ./SharpShell/coverage.ps1 |
| 48 | + - provider: NuGet |
| 49 | + api_key: |
| 50 | + secure: TWio+nDN8Ew7+OH7J3tLcEoM6DmxrIwfAr+2Ag8ROWJUEnXyoSAZ/I1GxBgB0qMd |
| 51 | + on: |
| 52 | + APPVEYOR_REPO_TAG: true |
| 53 | + - provider: GitHub |
| 54 | + auth_token: |
| 55 | + secure: KTWUORrnJKPKLSf/3ROLY50T9UfgTMnKHf3OjBOv8tlY/DAxtlglRU3eM+j45fMt |
| 56 | + on: |
| 57 | + APPVEYOR_REPO_TAG: true |
0 commit comments