From 0160ed5b28ee6891967e38e7c046a57b938131a7 Mon Sep 17 00:00:00 2001 From: alandefreitas Date: Wed, 25 Sep 2024 15:46:44 -0300 Subject: [PATCH] ci: print error log files --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59b4fc9..43bbad2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,17 @@ jobs: run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + continue-on-error: true + + - name: Print npm error log + if: failure() + run: | + # Find the latest npm debug log file and print its contents + LOG_FILE=$(ls -t /home/runner/.npm/_logs/*.log | head -n 1) + echo "Latest npm debug log file: $LOG_FILE" + cat $LOG_FILE + + publish-github: name: Publish Github Release