AppVeyor 可以只为特定分支自动发布 nuget 包吗?

Can AppVeyor do auto publishing of nuget packages only for specific branch?

在 AppVeyor CI 中,如果启用自动 NuGet 打包(设置 -> 构建 -> 自动打包),它会在每次构建时发布包,包括分支的构建。

是否可以自动设置但仅限于 master 分支?

您可以使用 conditional build configuration。这是简化的 appveyor.yml 示例:

-
    version: 1.0.0.{build}-{branch}

    branches:
      only:
        - master

    build:
      publish_nuget: true
      verbosity: minimal  

-
    version: 1.0.0.{build}-{branch}

    build:
      publish_nuget: false
      verbosity: minimal  

谢谢,

伊利亚.