From 2cfa20a0e0a3e3ac72e86f06af100e6e3534273d Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Sun, 31 Dec 2017 20:22:47 +0200 Subject: [PATCH] Automate chocolatey deployment --- Deploy/Prepare.ps1 | 8 +++++++- appveyor.yml | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Deploy/Prepare.ps1 b/Deploy/Prepare.ps1 index 21695079..5f18ddc0 100644 --- a/Deploy/Prepare.ps1 +++ b/Deploy/Prepare.ps1 @@ -11,4 +11,10 @@ $files += Get-ChildItem -Path "$PSScriptRoot\Portable\*"; # Pack into archive New-Item "$PSScriptRoot\Portable\bin" -ItemType Directory -Force -$files | Compress-Archive -DestinationPath "$PSScriptRoot\Portable\bin\LightBulb-Portable.zip" -Force \ No newline at end of file +$files | Compress-Archive -DestinationPath "$PSScriptRoot\Portable\bin\LightBulb-Portable.zip" -Force + +# --- CHOCOLATEY --- + +# Create package +New-Item "$PSScriptRoot\Choco\bin\" -ItemType Directory -Force +choco pack $PSScriptRoot\Choco\lightbulb.nuspec --out $PSScriptRoot\Choco\bin\ \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 246b1c19..c9e75c29 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,8 @@ artifacts: name: LightBulb-Installer.exe - path: Deploy\Portable\bin\LightBulb-Portable.zip name: LightBulb-Portable.zip +- path: Deploy\Choco\bin\LightBulb*.nupkg + name: LightBulb-Choco.nupkg deploy: - provider: GitHub @@ -24,6 +26,15 @@ deploy: secure: sjQHWRw29AMiVMn3MtidtWnAzAf1mJ+mkJ/7h1B9TIAHhkFrqwMK7LtXV+uNJ9AO artifact: LightBulb-Installer.exe,LightBulb-Portable.zip draft: true + on: + branch: master + appveyor_repo_tag: true +- provider: NuGet + server: https://chocolatey.org/ + api_key: + secure: f9mIs7girEeCzz+Il/rVM7H9i9N0D8pez22hLRMx24C91P76Hi7JiB0T8RxsJ2TJ + artifact: LightBulb-Choco.nupkg + skip_symbols: true on: branch: master appveyor_repo_tag: true \ No newline at end of file