-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
59 lines (58 loc) · 4.02 KB
/
appveyor.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: 1.0.{build}
image: Visual Studio 2022
configuration: Release
environment:
github_token: 'secure: zuJGSRrCtrCyD+zy7ZNSoSW7XRq8fYp8ouAyCNHCL5I78Rg+rRU9OsOynyHCJqaS'
myget_token: 'secure: 9Z+KYPk2hI7hg9kYLv/N13fvoqcYCP96isNUkRrKu0v87cw85H62oe/DCwpqvBXF'
app_settings_secret:
secure: sLmvbrRCLzpGAfj/DJQEGvRqAzhUdMSb19TKZtyEwnA=
app_settings_salt:
secure: 2VxpwwtEIc9dOvQj+lAMp4/AHxZ1/6ZaIev7XJGxTK7EQPrpqSpnPMPOizoYJR+Giifj0W2V5aYWUuOG+gu6kw==
init:
- set PATH=C:\Program Files\Java\jdk15\bin;%PATH%
- set JAVA_HOME_11_X64=C:\Program Files\Java\jdk15
- set JAVA_HOME=C:\Program Files\Java\jdk15
install:
- ps: dotnet tool install --global GitVersion.Tool --version 5.*
- ps: dotnet tool install --global dotnet-sonarscanner
- cmd: nuget sources add -Name EPiServerFeed -Source https://nuget.episerver.com/feed/packages.svc/
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- cmd: appveyor-tools\secure-file -decrypt EPi.Libraries.Commerce.ExchangeRates.Tests\appsettings.json.enc -secret %app_settings_secret% -salt %app_settings_salt%
before_build:
- cmd: nuget restore
- ps: dotnet-gitversion /l console /output buildserver
build_script:
- dotnet sonarscanner begin /k:"jstemerdink:EPi.Libraries.Commerce.ExchangeRates" /n:"EPi.Libraries.Commerce.ExchangeRates" /d:"sonar.host.url=https://sonarcloud.io" /o:"jstemerdink-github" /d:"sonar.login=0b0eec6902ab7d776899f79bfeff15d313dd6e09"
- dotnet build "EPi.Libraries.Commerce.ExchangeRates.sln" --no-restore -c Release -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_AssemblySemVer% -p:FileVersion=%GitVersion_AssemblySemFileVer% -p:ProductVersion=%GitVersion_MajorMinorPatch%
- dotnet pack "EPi.Libraries.Commerce.ExchangeRates.sln" --no-build -c Release -p:PackageVersion=%GitVersion_NuGetVersion%
- dotnet sonarscanner end /d:"sonar.login=0b0eec6902ab7d776899f79bfeff15d313dd6e09"
after_build:
- cmd: appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\EPi.Libraries.Commerce.ExchangeRates\bin\Release\EPi.Libraries.Commerce.ExchangeRates.%GitVersion_NuGetVersion%.nupkg"
- cmd: appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\EPi.Libraries.Commerce.ExchangeRates.CurrencyLayer\bin\Release\EPi.Libraries.Commerce.ExchangeRates.CurrencyLayer.%GitVersion_NuGetVersion%.nupkg"
- cmd: appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\EPi.Libraries.Commerce.ExchangeRates.Fixer\bin\Release\EPi.Libraries.Commerce.ExchangeRates.Fixer.%GitVersion_NuGetVersion%.nupkg"
- 7z a EPi.Libraries.Commerce.ExchangeRates.%GitVersion_NuGetVersion%.zip %APPVEYOR_BUILD_FOLDER%\EPi.Libraries.Commerce.ExchangeRates\bin\Release\*\*.dll
- cmd: appveyor PushArtifact "EPi.Libraries.Commerce.ExchangeRates.%GitVersion_NuGetVersion%.zip"
- 7z a EPi.Libraries.Commerce.ExchangeRates.CurrencyLayer.%GitVersion_NuGetVersion%.zip %APPVEYOR_BUILD_FOLDER%\EPi.Libraries.Commerce.ExchangeRates.CurrencyLayer\bin\Release\*\*.dll
- cmd: appveyor PushArtifact "EPi.Libraries.Commerce.ExchangeRates.CurrencyLayer.%GitVersion_NuGetVersion%.zip"
- 7z a EPi.Libraries.Commerce.ExchangeRates.Fixer.%GitVersion_NuGetVersion%.zip %APPVEYOR_BUILD_FOLDER%\EPi.Libraries.Commerce.ExchangeRates.Fixer\bin\Release\*\*.dll
- cmd: appveyor PushArtifact "EPi.Libraries.Commerce.ExchangeRates.Fixer.%GitVersion_NuGetVersion%.zip"
before_package:
- ps: >-
Write-Host -NoNewline "Installing NuGet 3.3.0..."
if (Test-Path 'C:\Tools\NuGet3') { $nugetDir = 'C:\Tools\NuGet3' } else { $nugetDir = 'C:\Tools\NuGet' }
deploy:
- provider: NuGet
server: https://www.myget.org/F/epi-libraries/api/v2/package
api_key:
secure: 9Z+KYPk2hI7hg9kYLv/N13fvoqcYCP96isNUkRrKu0v87cw85H62oe/DCwpqvBXF
skip_symbols: true
artifact: /.*\.nupkg/
on:
branch: develop # release from develop branch only
- provider: GitHub
auth_token:
secure: zuJGSRrCtrCyD+zy7ZNSoSW7XRq8fYp8ouAyCNHCL5I78Rg+rRU9OsOynyHCJqaS
artifact: /.*\.zip/
on:
branch: master # release from master branch only
#appveyor_repo_tag: true # deploy on tag push only