Git tag flow doesn't work with manual approval


#1

I use this workflow for my project, with a single master branch.

  • Any change in master then deploys to staging.
  • Github release tag format vx.x.x (e.g v1.2.0) then require manual approval to deploy to production.

It doesn’t work with git tag even from git client and Github release tag. Also, I wonder if I can do a more precise condition here like only release production with Git tag vx.x.x on master branch. Seems like the condition of filters block is OR not AND?

workflows:
  version: 2
  build_and_deploy:
    jobs:
      - test
      - staging:
          requires:
            - test
          filters:
            branches:
              only: master
      - hold:
          type: approval
          requires:
            - test
          filters:
            tags:
              only: /^v.*/
            branches:
              ignore: /.*/
      - production:
          requires:
            - hold
          filters:
            tags:
              only: /^v.*/
            branches:
              ignore: /.*/