diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18bf064feccf..c1e17ef67840 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,9 @@ jobs: env: BABEL_8_BREAKING: false STRIP_BABEL_8_FLAG: true + - name: Ensure cwd does not contain uncommitted changes + run: | + ./scripts/assert-dir-git-clean.sh - uses: actions/upload-artifact@v2 with: name: babel-artifact diff --git a/scripts/assert-dir-git-clean.sh b/scripts/assert-dir-git-clean.sh new file mode 100755 index 000000000000..2dcefe0119cd --- /dev/null +++ b/scripts/assert-dir-git-clean.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Must run at a git working dir +if [ -n "$(git status --porcelain=v1 2>/dev/null)" ]; then + echo "Please re-run \"make build\" and checkout the following changes to git" + git status + exit 1 +fi