bazzilic
bazzilic

Reputation: 828

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

In AppVeyor CI, if you enable automatic NuGet packaging (Settings -> Build -> Automatic Packaging), it publishes packages on every build, including builds of branches.

Is it possible to have it automatic but restrict it just to master branch?

Upvotes: 1

Views: 146

Answers (1)

Ilya Finkelsheyn
Ilya Finkelsheyn

Reputation: 2881

You can use conditional build configuration. Here is simplified appveyor.yml example:

-
    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  

Thank you,

Ilya.

Upvotes: 2

Related Questions