Skip to content

Commit 415e740

Browse files
committed
debug: capture npm publish error log as artifact
1 parent 2c7da1d commit 415e740

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ jobs:
3535
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3636

3737
- name: Publish to npm
38-
run: npm publish --ignore-scripts
38+
id: publish
39+
run: npm publish --ignore-scripts 2>&1 | tee /tmp/npm-publish.log; exit ${PIPESTATUS[0]}
3940
env:
4041
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4142

43+
- name: Upload publish log
44+
if: always()
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: npm-publish-log
48+
path: /tmp/npm-publish.log
49+
4250
- name: Create GitHub Release
4351
uses: softprops/action-gh-release@v2
4452
with:

0 commit comments

Comments
 (0)