Parcourir la source

fix(workflow): Fail the build if publishing has nonzero exit code (#664)

Rajiv Shah il y a 5 ans
Parent
commit
b6797096e5
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      .github/workflows/release-cargo.yml
  2. 1 1
      .github/workflows/release-npm.yml

+ 1 - 1
.github/workflows/release-cargo.yml

@@ -85,7 +85,7 @@ jobs:
         run: |
           echo "# Cargo Publish" | tee -a ${{runner.workspace }}/notes.md
           echo "\`\`\`" >> ${{runner.workspace }}/notes.md
-          cargo publish --no-verify 2>&1 | tee -a ${{runner.workspace }}/notes.md
+          set -o pipefail && cargo publish --no-verify 2>&1 | tee -a ${{runner.workspace }}/notes.md
           echo "\`\`\`" >> ${{runner.workspace }}/notes.md
       - name: Create Release
         id: create_crate_release

+ 1 - 1
.github/workflows/release-npm.yml

@@ -68,7 +68,7 @@ jobs:
         run: |
           echo "# NPM Package Publish" | tee -a ${{runner.workspace }}/notes.md
           echo "\`\`\`" >> ${{runner.workspace }}/notes.md
-          npm publish 2>&1 | tee -a ${{runner.workspace }}/notes.md
+          set -o pipefail && npm publish 2>&1 | tee -a ${{runner.workspace }}/notes.md
           echo "\`\`\`" >> ${{runner.workspace }}/notes.md
       - name: Create Release
         id: create_npm_release