# Note that this YML has significantly diverged from the v2 YML # when v2 branch comes to be merged to master, there will be # serious conflicts. When that happens, you should probably just # take the YML for v2 and discard what was in master. image: Previous Visual Studio 2019 environment: nodejs_version: "11" # AppVeyor installs Java on its build agents by default, but it # picks an old version that's not compatible with SonarQube. # This brings it up to date. JAVA_HOME: "C:\\Program Files\\Java\\jdk13" sonarcloud_org_name: elsa-workflows sonarcloud_project_name: elsa-workflows_elsa-core sonarcloud_api_key: secure: qaE9kOVkGGFM7ZMf3YeliZxDU9udTCy6W5xXHJ9T+tXv5qXPMYlIdR7hyNgxW04A version: 1.5.4.{build} pull_requests: do_not_increment_build_number: true # skip_non_tags: true skip_branch_with_pr: true dotnet_csproj: patch: true file: '**\*.csproj' version: '{version}' version_prefix: '{version}' package_version: '{version}' assembly_version: '{version}' file_version: '{version}' informational_version: '{version}' cache: - src\dashboard\Elsa.Dashboard\Theme\argon-dashboard\node_modules - '%APPDATA%\npm-cache' init: - cmd: git config --global core.autocrlf true install: - ps: >- dotnet tool install --global dotnet-sonarscanner before_build: - ps: >- if(-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet-sonarscanner begin /k:$env:sonarcloud_project_name /v:AppVeyor_build_$env:APPVEYOR_BUILD_VERSION /o:$env:sonarcloud_org_name /s:$env:APPVEYOR_BUILD_FOLDER\.SonarQube.Analysis.xml /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=$env:sonarcloud_api_key /d:sonar.cs.xunit.reportsPaths=$env:APPVEYOR_BUILD_FOLDER\**\TestResults\TestResults.xml /d:sonar.cs.opencover.reportsPaths=$env:APPVEYOR_BUILD_FOLDER\**\TestResults\*\coverage.opencover.xml /d:sonar.branch.name=$env:APPVEYOR_REPO_BRANCH } build_script: - ps: >- cd .\src\dashboard\Elsa.Dashboard\Theme\argon-dashboard npm install npm install --global gulp-cli gulp build cd ..\..\..\..\..\ - ps: dotnet build Elsa.sln after_build: - ps: if(-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet-sonarscanner end /d:sonar.login=$env:sonarcloud_api_key } - ps: dotnet pack Elsa.sln --include-symbols /p:Version="$env:APPVEYOR_BUILD_VERSION" artifacts: - path: '**/*.nupkg' name: NuGet deploy: - provider: NuGet api_key: secure: WC5CCcM5ksWOJbv925FNjv91KsfqHfwEe0A61FMNB27IxvttwJsvBC9XYwK+wQnp skip_symbols: true on: APPVEYOR_REPO_TAG: true branch: master