I moved this to a new topic as this is a separate issue and the last topic was 24 days old.
I would recheck the defaults for branch and tag filters. By default, branches include everything and tags exclude everything. Both workflows are running because both build jobs in each workflow are suppose to run. Nothing is telling them not to. A PR is just a branch commit like any other commit. Without any ignore filter, the build jobs will run.
I’ve added ignore: /.*/ telling to ignore any tag but it still builds. How can I tell CI to build only on tags matching /^release-.*/ but ignoring anything else ?
I also just tried numerous variations on configuration based on what is in the docs and also what has been written by various people in various threads.
It basically seems like regardless of what I do, ‘branches’ is the only filter that CircleCI actually bases any decisions on, when both filters are present.
What I want to do: deploy when I push a tagged release to master. That’s all. I don’t want to deploy based on a tag getting pushed to any other branch, but I don’t think it’s possible to configure this. You can either say “deploy from any branch when a tag gets pushed”, or “always deploy whatever gets pushed to master”.
Git branches and tags are two different things. A tag commit doesn’t have a branch and a branch commit doesn’t have a tag. So the filters for both tags and branches in Workflows are completely separate from each other.
That being said, they have different defaults. By default, CircleCI will build all branch commits and by default CircleCI won’t build tag commits. You use filters when you need to change the default behavior.
Pushing a tag and a commit at the same time is a very typical git workflow especially for anyone using NPM. When you run “npm version x.x.x” it will commit a change to package.json and create a git tag.
We’d like to setup our Circle config to build on every commit and do a build + npm deploy on every new tag. From my trials and these threads, it seems like there is no way to accomplish this without triggering a double build on the build + npm deploy step.