tag:help.appveyor.com,2012-11-13:/discussions/questions/23546-nuget-manual-publish-syntaxAppVeyor: Discussion 2018-10-01T21:00:24Ztag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T08:25:30Z2018-08-01T09:04:21ZNuget manual publish syntax<div><p>We currently have builds pushed to nuget with <code>on: appveyor_repo_tag: true</code><br>
And we want to turn this off and publish to nuget only via the UI when we chose to.<br>
The docs are not clear on how to do this.<br>
e.g. does this:</p>
<pre>
<code> on:
appveyor_repo_tag: false</code>
</pre>
<p>mean "publish whenever there isn't a tag" or "do not publish, regardless of tags" ?</p>
<p>If I delete the "on" block entirely does that mean always publish, or never publish?</p>
<p>If I want to never automatically publish, is there a simple syntax for this, or can I hack it for a condition that is always false, e.g.</p>
<pre>
<code> on:
branch: nosuchbranchexists</code>
</pre></div>anthony.steeletag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T09:17:35Z2018-08-01T09:17:35ZNuget manual publish syntax<div><p>In your case you do not need <strong>inline</strong> deployment at all, but you need <strong>environment</strong> deployment. Please read the difference <a href="https://www.appveyor.com/docs/deployment/#overview">here</a>. So you simple need to delete your existing inline deployment from that YAML and create new one at <a href="https://ci.appveyor.com/environments">https://ci.appveyor.com/environments</a>. Then you will be able to deploy artifacts from any successful build manually.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T09:25:19Z2018-08-01T09:26:39ZNuget manual publish syntax<div><p>Thanks.</p>
<p>We already have a "nuget.org" environment.</p>
<p>Is the fact that we have a "deploy" button at top right the "latest build" page the result of this existing environment, or is it caused by the inline?</p></div>anthony.steeletag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T09:29:50Z2018-08-01T09:29:50ZNuget manual publish syntax<div><p>This button simple allows you to select environment to deploy artifacts from build you open. It can be also not latest build, but any other successful build you select from the builds history.<br>
If you go from some specific environment, UI will allow you to choose project and them specific build from its history.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T09:43:31Z2018-08-01T09:52:53ZNuget manual publish syntax<div><p>So, I think you're saying that the "deploy" button at top right the "latest build" page (and other pages) <em>is</em> the result of this existing environment, not the appveyor.yml configuration?</p></div>anthony.steeletag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T09:56:42Z2018-08-01T09:56:42ZNuget manual publish syntax<div><p>No. This button exists even if you have zero deployment environments, you will simple see no environments to select from in the drop-down if you press this button before creating any environment.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T10:01:26Z2018-08-01T10:05:51ZNuget manual publish syntax<div><p>Ok thanks for being precise though still not clear about the thing that I was asking. You are also (I think) saying that the fact that the deploy button <em>is usable</em> is due to environments, not the appveyor.yml configuration.</p></div>anthony.steeletag:help.appveyor.com,2012-11-13:Comment/458180772018-08-01T10:07:20Z2018-08-01T10:07:20ZNuget manual publish syntax<div><p>Exactly, this button links specific build (it's artifacts) to environments (which are being configured in UI, not YAML). I think if you play with UI from both sides (this button and also "Deploy" menu for specific environment), you can get the feeling how builds and environments can be glued together.</p>
<p>Main idea behind environments is to decouple deployment from build so you can deploy the same bits (specific build artifacts) multiple time at any moment, without re-building.</p></div>Ilya Finkelshteyn