How to push packages to nuget when I push a tag?

Peter Mounce's Avatar

Peter Mounce

01 Jul, 2015 01:23 PM

I've seen the github-releases deployment provider is capable of deploying on a tag.

I'd love to be able to have the nuget provider do that too (especially if I still get to have conditional deployment as branches support now - I'd like to only deploy on particular patterns of tags).

I'd love for my release process to be:
```shell
git tag -a v1.2.3 -m "Release v1.2.3"
git push --tags upstream
# appveyor takes over
```

I think the closest I can come to this right now is creating a v1.2.3 branch, which is not ideal because it's mutable.

  1. Support Staff 1 Posted by Feodor Fitsner on 01 Jul, 2015 08:41 PM

    Feodor Fitsner's Avatar

    You can set NuGet provider to deploy on tag build:

    # publish NuGet package on tag build
    deploy:
    - provider: NuGet
      api_key:
        secure: <your-secured-api-key>
      on:
        appveor_repo_tag: true
    
  2. 2 Posted by Peter Mounce on 03 Jul, 2015 09:52 AM

    Peter Mounce's Avatar

    Thank you, that's exactly what I wanted!

    I was confused by the note in github-releases deployment provider doc about
    that being the only one that could deploy from a tag.

    Peter Mounce Senior Engineer
    ------------------------------
    Fleet Place House, 2 Fleet Place, London EC4M 7RF
    WEB tech.just-eat.com

    TWITTER @petemounce
    ------------------------------

    *Pete found a takeaway on JUST EAT that sells lobster #minifistpump*

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:57 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac