Appveyor treats branch and tag as same when receiving webhook from github

ericnewton76's Avatar


07 Jan, 2018 05:36 AM

Why does it do this? Kinda strange because I wanna do builds from master branch always,

...and do deploys only when branch=master & APPVEYOR_REPO_TAG=true.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 08 Jan, 2018 08:33 PM

    Ilya Finkelshteyn's Avatar

    This is most probably annotated tag. If you check webhook content sent to AppVeyor can see that "base_ref": null in this webhook (it it always this way for annotated tags). Therefore AppVeyor sets tag name (e.g. v2.2.0 in this case) as a branch name.

    What you can do is to add regular expression to your deployment-on-branch condition
    which matches master branch and your current and future tag names. It could look like this /master|^v\d+\.\d+\.\d+$/. Note that this is just a sample regular expression you need to tune it more. Also note that it should be wrapped in // for AppVeyor to threat it as a regular expression.

    Please let us know if this works for you.

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:26 AM.

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

Keyboard shortcuts


? 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