适用于 .Net Core 2.0 的 AppVeyor CI。 nuget 包的自动发布不起作用
AppVeyor CI for .Net Core 2.0. Automatic publication of the nuget package does not work
我想在 nuget.org 的项目页面上发布包
请告诉我,我的配置有什么问题,虽然配置中有 publish_nuget,但没有调用 nuget pack:是吗?
或者您有 .net core 的脚本示例吗?
项目结构:
//*************************************************** *********************
DaDataApiClient__
DadataApiClient_
DadataApiClient.nuspec
DadataApiClient.csproj
__ //... sources
DadataApiClient.Test_
DadataApiClient.Test.csproj
//...sources
appveyor.yml
DadataApiClient.sln
...
//*********************************************************************************
现在正在构建,正在测试 运行,然后系统尝试发送数据包而不是将 dll 打包到包中 (nuget pack)。
该项目是在 .net core 2.0
下构建的
随附的配置文件 (appveyor.yml)
构建 ci ( https://ci.appveyor.com/project/Xambey/dadataapiclient )
的日志文件
懒人的文本:
version: 1.0.{build}
branches:
only:
- master
skip_branch_with_pr: true
image: Visual Studio 2017
configuration: Release
shallow_clone: true
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
environment:
matrix:
- TOKEN:
secure: EFVcZzUo9GxQ+slLBFQc2zhFzlfA9gULAy0cXu5m6mQbyzRYLxnAw3F+Z0Qx0Jef
SECRET:
secure: Wz456M9HIV13gTGBd4Eh1F+EsMcmwKgqJhG44BFaXTdC0TyX3k02vAoqOSMo9Xd7
nuget:
project_feed: true
before_build:
- ps: nuget restore
build:
publish_nuget: true
verbosity: minimal
artifacts:
- path: '*\*.nupkg'
deploy:
- provider: NuGet
api_key:
secure: MgLMMGChxGhyyhSrWuntCcR83vpMU7geCo8YfmNVFbW8FLtf/GZqQLd3ZdNoMMzY
skip_symbols: true
artifact: '*\*.nupkg'
on:
branch: master
notifications:
- provider: GitHubPullRequest
on_build_success: true
on_build_failure: false
on_build_status_changed: false
新的 .csproj
格式不需要 .nuspec
文件。然而,对于 AppVeyor 补丁和打包 .csproj
,某些元素应该已经存在于其中。 GitHub 问题 https://github.com/appveyor/ci/issues/1907 中对此进行了讨论。如此简单地将 <Version>1.0.1</Version>
添加到 .csproj
将修复您的补丁和打包。
我想在 nuget.org 的项目页面上发布包 请告诉我,我的配置有什么问题,虽然配置中有 publish_nuget,但没有调用 nuget pack:是吗? 或者您有 .net core 的脚本示例吗?
项目结构: //*************************************************** *********************
DaDataApiClient__
DadataApiClient_
DadataApiClient.nuspec
DadataApiClient.csproj
__ //... sources
DadataApiClient.Test_
DadataApiClient.Test.csproj
//...sources
appveyor.yml
DadataApiClient.sln
...
//*********************************************************************************
现在正在构建,正在测试 运行,然后系统尝试发送数据包而不是将 dll 打包到包中 (nuget pack)。 该项目是在 .net core 2.0
下构建的随附的配置文件 (appveyor.yml)
构建 ci ( https://ci.appveyor.com/project/Xambey/dadataapiclient )
的日志文件懒人的文本:
version: 1.0.{build}
branches:
only:
- master
skip_branch_with_pr: true
image: Visual Studio 2017
configuration: Release
shallow_clone: true
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
environment:
matrix:
- TOKEN:
secure: EFVcZzUo9GxQ+slLBFQc2zhFzlfA9gULAy0cXu5m6mQbyzRYLxnAw3F+Z0Qx0Jef
SECRET:
secure: Wz456M9HIV13gTGBd4Eh1F+EsMcmwKgqJhG44BFaXTdC0TyX3k02vAoqOSMo9Xd7
nuget:
project_feed: true
before_build:
- ps: nuget restore
build:
publish_nuget: true
verbosity: minimal
artifacts:
- path: '*\*.nupkg'
deploy:
- provider: NuGet
api_key:
secure: MgLMMGChxGhyyhSrWuntCcR83vpMU7geCo8YfmNVFbW8FLtf/GZqQLd3ZdNoMMzY
skip_symbols: true
artifact: '*\*.nupkg'
on:
branch: master
notifications:
- provider: GitHubPullRequest
on_build_success: true
on_build_failure: false
on_build_status_changed: false
新的 .csproj
格式不需要 .nuspec
文件。然而,对于 AppVeyor 补丁和打包 .csproj
,某些元素应该已经存在于其中。 GitHub 问题 https://github.com/appveyor/ci/issues/1907 中对此进行了讨论。如此简单地将 <Version>1.0.1</Version>
添加到 .csproj
将修复您的补丁和打包。