version: 1.0.{build}

install:
    - cinst pester

init:
    - git config --global core.autocrlf true

before_build:
    - nuget restore
    - ps: Update-Help

build_script:
    - ps: .\build.ps1

on_finish: 
    - ps: | 
        # Pester tests produce artifacts in .\out directory
        $pesterTestResultsFile = ".\TestsResults.xml"
        $res = Invoke-Pester -OutputFormat NUnitXml -OutputFile $pesterTestResultsFile -PassThru
        (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $pesterTestResultsFile))
        $stagingDirectory = (Resolve-Path ..).Path 
        $zipFile = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip" 
        Add-Type -assemblyname System.IO.Compression.FileSystem 
        [System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\out\platyPS", $zipFile) 
        @( 
            # You can add other artifacts here 
            (ls $zipFile),
            (ls .\out -File)
        # flattering            
        ) | % {$_} | % { Push-AppveyorArtifact $_.FullName } 
        # Trying to fail the build
        if ($res.FailedCount -gt 0) { 
            throw "$($res.FailedCount) tests failed."
        }

version: 1.0.{build}

install:
    - cinst pester

init:
    - git config --global core.autocrlf true

before_build:
    - nuget restore
    - ps: Update-Help

build_script:
    - ps: .\build.ps1

on_finish: 
    - ps: | 
        # Pester tests produce artifacts in .\out directory
        $pesterTestResultsFile = ".\TestsResults.xml"
        $res = Invoke-Pester -OutputFormat NUnitXml -OutputFile $pesterTestResultsFile -PassThru
        (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $pesterTestResultsFile))
        $stagingDirectory = (Resolve-Path ..).Path 
        $zipFile = Join-Path $stagingDirectory "platyPS-$($env:APPVEYOR_BUILD_VERSION).zip" 
        Add-Type -assemblyname System.IO.Compression.FileSystem 
        [System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\out\platyPS", $zipFile) 
        @( 
            # You can add other artifacts here 
            (ls $zipFile),
            (ls .\out -File)
        # flattering            
        ) | % {$_} | % { Push-AppveyorArtifact $_.FullName } 
        # Trying to fail the build
        if ($res.FailedCount -gt 0) { 
            throw "$($res.FailedCount) tests failed."
        }

Change name of the generated archive
Change name of the generated archive
