浏览代码

Improve `release-cycle.yml` error reporting (#4034)

Ernesto García 2 年之前
父节点
当前提交
95027565c4
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      scripts/release/workflow/start.sh

+ 4 - 1
scripts/release/workflow/start.sh

@@ -29,4 +29,7 @@ git add .
 git commit -m "Start release candidate"
 git commit -m "Start release candidate"
 
 
 # Push branch
 # Push branch
-git push origin "$RELEASE_BRANCH"
+if ! git push origin "$RELEASE_BRANCH"; then
+  echo "::error file=scripts/release/start.sh::Can't push $RELEASE_BRANCH. Did you forget to run this workflow from $RELEASE_BRANCH?"
+  exit 1
+fi