From e9fe9605c24e17be4573e36eb13cd67df3699167 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Feb 2024 10:38:16 -0500 Subject: [PATCH] set -o pipefail + do not rely on bump being the last line -- parse from debug msg --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15d9c233..66a2e29b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,9 @@ jobs: id: auto-version run: | # to be able to debug if something goes wrong + set -o pipefail auto version -v | tee /tmp/auto-version - version="$(tail -n 1 /tmp/auto-version)" + version=$(sed -ne '/Calculated SEMVER bump:/s,.*: *,,p' < /tmp/auto-version) echo "version=$version" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}