Having this CircleCI setup in config.yml
:
any_releasable: &any_releasable
filters:
tags:
only: /^d+.d+.d+/
branches:
ignore: /.*/
We’re able to execute a continuous-deployment
job when a new tag with semantic versioning is created:
continuous-deployment:
jobs:
- build_release:
<<: *any_releasable
- notify_slack_qa_release:
<<: *any_releasable
context:
- slack-secrets
version: << pipeline.git.tag >>
channel: ${SLACK_RELEASE_CHANNEL}
requires:
- build_release
That has been working without any problem so far, but this morning stopped working, because every new commit to any branch is triggering continuous-deployment
workflow and failing, because there is no version parameter (which makes sense, because there is no tag).
I’ve looked into the most recent changes from CircleCI changelog, but I couldn’t see anything relevant to this issue.
How should we be sure that this continuous-deployment
is only executed when there is a new tag (with semantic versioning format) pushed to github?