"GitHub" deployment for branch "master" has been skipped because current branch is a {tag}
Hi,
I'm trying to publish a release to GitHub when build is started by a tag on master with the setting from the docs:
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only
But I get the following message, when it runs:
"GitHub" deployment for branch "master" has been skipped because current branch is "3.2.125"
Can it be done?
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 13 Jul, 2022 04:07 PM
In tag builds if branch information cannot be provided by GitHub/GitLab/etc. API branch is replaced with tag name. In general, tag is not always bound to a branch, it points to a specific commit which could belong to any branch. Just remove
branch: master
condition from deployment options.Support Staff 2 Posted by Feodor Fitsner on 13 Jul, 2022 04:13 PM
More info on the tags: https://stackoverflow.com/a/27154277/1435891
3 Posted by ahl on 13 Jul, 2022 06:21 PM
Thanks for the quick reply! :)
Removing `branch: master` won't exactly do what I need though, I think. I would like to only deploy to github if the commit the pushed tag points to is also contained in master.
As when `git branch --contains tags/<tag>` returns master.
The purpose of it all is to say that pre-releases, which are tags that will always be pushed on other branches than master, should not be released to github, but only to another nuget provider.
I could do it by setting an environment variable and check it in `on:` I guess?
Support Staff 4 Posted by Feodor Fitsner on 13 Jul, 2022 07:07 PM
Right, using environment variable could be a good approach. You can have something, like this in PowerShell (not tested):
5 Posted by ahl on 15 Jul, 2022 07:43 AM
Thanks again.
TAG_BRANCH will possible contain a list, does ...
on:
TAG_BRANCH: master
check for contain or exact match?
Support Staff 6 Posted by Feodor Fitsner on 15 Jul, 2022 03:01 PM
yes, everything in
on
section should be exact match. You may try doing something like though:Feodor Fitsner closed this discussion on 14 Sep, 2022 09:02 PM.