I have a CI pipeline in Bitbucket which is used to build and test a shared Node.js library. If we create tag (eg. npm version patch -m "Upgrade to 0.1.2 for bug fix"
) the new version must be published to the npm repository.
Therefore I have the following pipeline configuration:
pipelines:
default:
- step: *build-test-sonarcloud
tags:
'*':
- step: *build-test-sonarcloud
- step: *build-deploy-npm
However, if I push all changes after 'npm version patch' two pipelines are started. I suppose that this is because the file 'package.json' is also committed and not only a tag.
My idea is that only the 'tags'-pipeline should be started in case of a commit of a tag (with or without any files). Is there a way to only trigger that pipeline and prevent the default pipeline to run?