From 94ffe8330357958bd4db2f4ecf4b9a8c19804106 Mon Sep 17 00:00:00 2001 From: staticdev Date: Mon, 20 Jul 2020 18:48:47 -0300 Subject: [PATCH] Pipefail release workflow --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2cb6f98..182ef74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,12 +30,18 @@ jobs: pip install --constraint=.github/workflows/constraints.txt poetry poetry --version + - name: Check if there is a parent commit + id: check-parent-commit + run: | + echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)" + - name: Detect and tag new version id: check-version + if: steps.check-parent-commit.outputs.sha uses: salsify/action-detect-and-tag-new-version@v2.0.1 with: version-command: | - poetry version | awk '{ print $2 }' + bash -o pipefail -c "poetry version | awk '{ print \$2 }'" - name: Bump version for developmental release if: "! steps.check-version.outputs.tag"