Skip to content

Commit

Permalink
Merge pull request #14 from KarolKaczmarek/KarolKaczmarek-patch-1
Browse files Browse the repository at this point in the history
Creating nuget package and pushing as artifact
  • Loading branch information
KarolKaczmarek committed Aug 5, 2015
2 parents 1b9f719 + 4f25234 commit 812fb65
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

install:
- cinst -y pester
- ps: |
nuget.exe spec


#---------------------------------#
# build configuration #
Expand Down Expand Up @@ -69,11 +68,29 @@ deploy:

on_finish:
- ps: |
# Creating project artifact
$stagingDirectory = (Resolve-Path ..).Path
$zipFile = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
$zipFilePath = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
Add-Type -assemblyname System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory($pwd, $zipFile)
[System.IO.Compression.ZipFile]::CreateFromDirectory($pwd, $zipFilePath)
# Creating NuGet package artifact
New-Item nuget -ItemType Directory > $null
Push-Location
cd lib
nuget.exe spec
Pop-Location
nuget pack .\lib\Package.nuspec -outputdirectory .\nuget
$nuGetPackagePath = (Get-ChildItem .\nuget).FullPath
@(
# You can add other artifacts here
(ls $zipFile)
) | % { Push-AppveyorArtifact $_.FullName }
(ls $zipFilePath),
(ls $nuGetPackagePath)
) | % {
Write-Host "Pushing package $_.Name as Appveyor artifact"
Push-AppveyorArtifact $_.FullName
}

0 comments on commit 812fb65

Please sign in to comment.