Skip to content

Commit

Permalink
Workaround AppVeyor publish issue
Browse files Browse the repository at this point in the history
Work around issue with publishing NuGet packages from AppVeyor.
See http://help.appveyor.com/discussions/problems/8215-cannot-publish-to-nuget-get-400-bad-request-error
  • Loading branch information
martincostello committed Oct 2, 2017
1 parent 3e8bdb6 commit 4020dbb
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version: 1.0.{build}
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NUGET_XMLDOC_MODE: skip
NUGET_API_KEY:
secure: 6MzbzEs4YdJKS67Gio5gEO8mNKmwfC4UHTCmECZ1KOutI6ndm4vAECazmVNB6an7

branches:
only:
Expand All @@ -26,12 +28,17 @@ nuget:
skip_tags: false
test: off

deploy:

- provider: NuGet
api_key:
secure: 6MzbzEs4YdJKS67Gio5gEO8mNKmwfC4UHTCmECZ1KOutI6ndm4vAECazmVNB6an7
artifact: /.*\.nupkg/
skip_symbols: false
on:
appveyor_repo_tag: true
deploy_script:
- appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- ps: if ($env:APPVEYOR_REPO_TAG -ne "false") { ($artifacts.values | Where-Object {($_.path -like '*.nupkg') -and !($_.path -like '*.symbols.nupkg')}) | foreach-object {nuget.exe push $_.path -Source https://www.nuget.org/api/v2/package -ApiKey $env:NUGET_API_KEY; if ($lastexitcode -ne 0) {throw}}}

#deploy:
#
# - provider: NuGet
# api_key:
# secure: 6MzbzEs4YdJKS67Gio5gEO8mNKmwfC4UHTCmECZ1KOutI6ndm4vAECazmVNB6an7
# artifact: /.*\.nupkg/
# skip_symbols: false
# on:
# appveyor_repo_tag: true
#

0 comments on commit 4020dbb

Please sign in to comment.