From 3c9aa3f7c9354a80150379aa34a319a864e8bd3f Mon Sep 17 00:00:00 2001 From: ProgramComputer <22284856+ProgramComputer@users.noreply.github.com> Date: Sat, 10 Oct 2026 23:51:07 -0500 Subject: [PATCH] Fail the release workflow when npm stage publish fails --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f033c9..6cf1a57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -159,7 +159,10 @@ jobs: env: TARBALL: ${{ needs.build.outputs.tarball }} DIST_TAG: ${{ inputs.dist_tag }} - run: npm stage publish "./$TARBALL" --tag "$DIST_TAG" --access public --provenance 2>&1 | tee stage-output.txt + # Without pipefail, tee's exit status would hide a failed publish. + run: | + set -euo pipefail + npm stage publish "./$TARBALL" --tag "$DIST_TAG" --access public --provenance 2>&1 | tee stage-output.txt - name: Next steps env: