How to deploy to nuget/myget when a GH tag is created
Hi Feodor.
I'm trying to have a single yml file that does all
my builds / tests / deploys
based on this convo.
What i'm trying to do is this:
- if branch == master AND is-a-tag
1) set build version to be the TAG{APPVEYOR_REPO_TAG_NAME}
2) publish to private myget feed#1<-- our internal release builds - else
1) set build version to be{build}
2) publish to private myget feed#2<-- our internal pre-release builds
So all our commits will always be pushing nugets to our pre-release feed.
When we are ready to push a package to our release feed, we TAG
a commit as valid semver (eg. 1.1.0) and push that tag up (or tag
directly in GH's UI) which then kicks off a pull build/test and
this time, deploy to our release feed #1 with the tag name
being the nuget-package version
{APPVEYOR_REPO_TAG_NAME}.
Is this possible?
I read about conditional deploys in the docs but I'm not sure about the setting-build-version-to-be-our-the-tag
Of course, if the tag is not semver .. the the world blows up .... so i'll assume we tag correctly :)
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

Support Staff 1 Posted by Feodor Fitsner on 15 Jul, 2016 04:43 AM
You would need to do a little PowerShell to get the desired result.
To set build version from a build you can use this API: http://www.appveyor.com/docs/build-worker-api#update-build-details
To switch between deployments you may introduce additional environment variables and then depend on them, kind of (pseudo code):
2 Posted by Pure Krome on 15 Jul, 2016 05:59 AM
Gotcha!
So this is what I'm trying...
Before anything really happens, lets override the
{version}if- branch =
master- tag =
trueNow i'm getting this...
It's not deploying .. even though I've said: Deploy for branch
dev.here's my sections:
It's like it's ignoring the first
deploysection?3 Posted by Pure Krome on 15 Jul, 2016 06:02 AM
Ignore my post...
I understand the message now.
Deploy
master+tag=> It skipped this because we're in adevbranch - TICK.Deploy
dev=> It failed because it failed to find the nuspecs. Nothing to deploy, then!What are the rules again for finding nuspecs(s) please?
4 Posted by Pure Krome on 22 Aug, 2016 04:20 AM
Answer -
.csprojfile..csprojfile).eg.
-
MyProject.csproj-
MyProject.nuspecPure Krome closed this discussion on 22 Aug, 2016 04:20 AM.