From 0933a3007dd42597988105fd5a70f5980c95fe41 Mon Sep 17 00:00:00 2001 From: Ben Moore Date: Mon, 6 Apr 2020 09:52:16 -0500 Subject: [PATCH] ci: include extra protections against tags in other branches --- .circleci/config.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a4f94f1..4ef8ac5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ commands: - run: command: | cd /tmp/artifacts - SLUG=grep 'Text Domain:' /tmp/src/plugin.php | awk -F: '{print $2}' | sed 's/^\s//' + SLUG=$(grep '@package' /tmp/src/plugin.php | awk -F ' ' '{print $3}' | sed 's/^\s//') svn co https://plugins.svn.wordpress.org/$SLUG --depth=empty . svn up trunk svn up tags --depth=empty @@ -127,7 +127,6 @@ workflows: - deploy_svn_branch: context: genesis-svn requires: - - checkout - checks filters: branches: @@ -140,7 +139,7 @@ workflows: tags: only: /^\d+\.\d+\.\d+$/ branches: - only: master + ignore: /.*/ - checks: requires: - checkout @@ -148,14 +147,22 @@ workflows: tags: only: /^\d+\.\d+\.\d+$/ branches: - only: master - - deploy_svn_tag: - context: genesis-svn + ignore: /.*/ + - hold: + type: approval requires: - - checkout - checks filters: tags: only: /^\d+\.\d+\.\d+$/ branches: - only: master + ignore: /.*/ + - deploy_svn_tag: + context: genesis-svn + requires: + - hold + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + branches: + ignore: /.*/