version: '{build}'

clone_depth: 50

cache:
  - '%LOCALAPPDATA%\Microsoft\dotnet -> appveyor.yml'
  - '%USERPROFILE%\.nuget\packages -> appveyor.yml, **\project.json, Nuget.Config'

before_build:
  # Install dotnet cli
  - appveyor DownloadFile https://raw.githubusercontent.com/dotnet/cli/v1.0.4/scripts/obtain/dotnet-install.ps1
  - powershell -File dotnet-install.ps1
  - set PATH=%PATH%;%LOCALAPPDATA%\Microsoft\dotnet
  - dotnet --version

  # Restore packages
  - dotnet restore .\UnitConversion\UnitConversion.csproj
  - dotnet restore .\UnitConversionTests\UnitConversionTests.csproj

build_script:
  - dotnet build .\UnitConversion\UnitConversion.csproj
  - dotnet build .\UnitConversionTests\UnitConversionTests.csproj

test_script:
  - dotnet test .\UnitConversionTests\UnitConversionTests.csproj

after_test:
  - dotnet pack .\UnitConversion\UnitConversion.csproj --configuration=Release --output="%USERPROFILE%\Artifacts"

artifacts:
  - path: %USERPROFILE%\Artifacts\*.nupkg

version: '{build}'

clone_depth: 50

cache:
  - '%LOCALAPPDATA%\Microsoft\dotnet -> appveyor.yml'
  - '%USERPROFILE%\.nuget\packages -> appveyor.yml, **\project.json, Nuget.Config'

before_build:
  # Install dotnet cli
  - appveyor DownloadFile https://raw.githubusercontent.com/dotnet/cli/v1.0.4/scripts/obtain/dotnet-install.ps1
  - powershell -File dotnet-install.ps1
  - set PATH=%PATH%;%LOCALAPPDATA%\Microsoft\dotnet
  - dotnet --version

  # Restore packages
  - dotnet restore .\UnitConversion\UnitConversion.csproj
  - dotnet restore .\UnitConversionTests\UnitConversionTests.csproj

build_script:
  - dotnet build .\UnitConversion\UnitConversion.csproj
  - dotnet build .\UnitConversionTests\UnitConversionTests.csproj

test_script:
  - dotnet test .\UnitConversionTests\UnitConversionTests.csproj

after_test:
  - dotnet pack .\UnitConversion\UnitConversion.csproj --configuration=Release --output="\Artifacts"

artifacts:
  - path: \Artifacts\*.nupkg

Fix attempt on artefacts absolute path
Fix attempt on artefacts absolute path
