From b0d5ee1e1aebc509071dadb1971b00de74c9ee62 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Fri, 16 Feb 2024 14:46:28 +0000 Subject: [PATCH] testing error-handling in release-plan --- .github/workflows/plan-release.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index 5737f3d..d6fc4b1 100644 --- a/.github/workflows/plan-release.yml +++ b/.github/workflows/plan-release.yml @@ -62,12 +62,18 @@ jobs: id: explanation run: | set -x - - pnpm release-plan prepare - - echo 'text<> $GITHUB_OUTPUT - jq .description .release-plan.json -r >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT + + pnpm release-plan prepare 2> >(tee -a stderr.log >&2) + + if [ $? -ne 0 ]; then + echo 'text<> $GITHUB_OUTPUT + cat stderr.log >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + else + echo 'text<> $GITHUB_OUTPUT + jq .description .release-plan.json -r >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + fi env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}