Skip to content

Commit b5d549e

Browse files
Fail the release workflow when npm stage publish fails (#19)
1 parent 751fe24 commit b5d549e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ jobs:
159159
env:
160160
TARBALL: ${{ needs.build.outputs.tarball }}
161161
DIST_TAG: ${{ inputs.dist_tag }}
162-
run: npm stage publish "./$TARBALL" --tag "$DIST_TAG" --access public --provenance 2>&1 | tee stage-output.txt
162+
# Without pipefail, tee's exit status would hide a failed publish.
163+
run: |
164+
set -euo pipefail
165+
npm stage publish "./$TARBALL" --tag "$DIST_TAG" --access public --provenance 2>&1 | tee stage-output.txt
163166
164167
- name: Next steps
165168
env:

0 commit comments

Comments
 (0)