在 Appveyor 提要上发布 nuget 包
Publish a nuget package on Appveyor feed
我有一个基于 Appveyor 的 C# 解决方案,最终的工件是一个 nuget 包。
我希望在自定义 Appveyor 包提要中发布此类包。
我试过像这样修改 appveyor.yml
文件:
version: 1.0.{build}
branches:
only:
- develop
image: Visual Studio 2015
build:
verbosity: minimal
deploy:
- provider: NuGet
symbol_server: https://ci.appveyor.com/nuget/dataparsers-xxxxxxxxxx/api/v2/package
api_key:
secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
artifact: /.*\.symbols\.nupkg/
但它不起作用。 yml文件解析不正确(错误在第8行:"deploy" basically)
此外,我在哪里指定包名称?
https://www.appveyor.com/docs/nuget/#configuring-appveyor-nuget-feeds-for-your-builds
编辑
实际错误:
Error parsing appveyor.yml: (Line: 8, Col: 2, Idx: 106) - (Line: 8, Col: 2, Idx: 106): While parsing a block mapping, did not find expected key.
这是正确的 YAML,所以最有可能的问题是源代码中有一个 Tab 字符使缩进在视觉上看起来不错,但混淆了(缩进)字符计数解析器正在使用,因为它不知道如何扩展 Tab(4 个空格、8 个空格等)
一些额外的 Appveyor 相关技巧来避免 YAML 问题:
在 UI 中进行更改,然后使用“设置”>“导出 YAML”
--伊利亚.
我有一个基于 Appveyor 的 C# 解决方案,最终的工件是一个 nuget 包。
我希望在自定义 Appveyor 包提要中发布此类包。
我试过像这样修改 appveyor.yml
文件:
version: 1.0.{build}
branches:
only:
- develop
image: Visual Studio 2015
build:
verbosity: minimal
deploy:
- provider: NuGet
symbol_server: https://ci.appveyor.com/nuget/dataparsers-xxxxxxxxxx/api/v2/package
api_key:
secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
artifact: /.*\.symbols\.nupkg/
但它不起作用。 yml文件解析不正确(错误在第8行:"deploy" basically)
此外,我在哪里指定包名称?
https://www.appveyor.com/docs/nuget/#configuring-appveyor-nuget-feeds-for-your-builds
编辑
实际错误:
Error parsing appveyor.yml: (Line: 8, Col: 2, Idx: 106) - (Line: 8, Col: 2, Idx: 106): While parsing a block mapping, did not find expected key.
这是正确的 YAML,所以最有可能的问题是源代码中有一个 Tab 字符使缩进在视觉上看起来不错,但混淆了(缩进)字符计数解析器正在使用,因为它不知道如何扩展 Tab(4 个空格、8 个空格等)
一些额外的 Appveyor 相关技巧来避免 YAML 问题:
在 UI 中进行更改,然后使用“设置”>“导出 YAML”
--伊利亚.