From 05629fcd8ecba8e7d03282d074517f93ed5e36af Mon Sep 17 00:00:00 2001 From: MantisClone Date: Mon, 15 Jul 2024 14:58:42 -0400 Subject: [PATCH 1/4] print `npm whoami` --- .github/workflows/npm-publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index be556e34..00aeed09 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -47,4 +47,5 @@ jobs: if: steps.is-release-needed.outputs.is-release-needed == 'true' run: | npm config set registry https://registry.npmjs.org + npm whoami npm publish --workspace=${{ matrix.package }} From 07ca2b4b7d24c02d344c1510066f51bb08ff3b14 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Mon, 15 Jul 2024 15:01:28 -0400 Subject: [PATCH 2/4] Add --dry-run --- .github/workflows/npm-publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index 00aeed09..1826a225 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -48,4 +48,4 @@ jobs: run: | npm config set registry https://registry.npmjs.org npm whoami - npm publish --workspace=${{ matrix.package }} + npm publish --workspace=${{ matrix.package }} --dry-run From f8ad59269e6421bfd3346ae30d012109496149ba Mon Sep 17 00:00:00 2001 From: MantisClone Date: Tue, 16 Jul 2024 10:04:22 -0400 Subject: [PATCH 3/4] add more debug logging --- .github/workflows/npm-publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index 1826a225..fca8a5d1 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -48,4 +48,5 @@ jobs: run: | npm config set registry https://registry.npmjs.org npm whoami + npm config get registry npm publish --workspace=${{ matrix.package }} --dry-run From f335da93759556b547eadc285d71ad052b6b4f7d Mon Sep 17 00:00:00 2001 From: MantisClone Date: Tue, 16 Jul 2024 10:13:46 -0400 Subject: [PATCH 4/4] Fix according to CodeRabbit --- .github/workflows/npm-publish.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index fca8a5d1..46881729 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -47,6 +47,6 @@ jobs: if: steps.is-release-needed.outputs.is-release-needed == 'true' run: | npm config set registry https://registry.npmjs.org - npm whoami - npm config get registry + npm whoami || { echo "Failed to identify npm user."; exit 1; } + npm config get registry || { echo "Failed to get npm registry."; exit 1; } npm publish --workspace=${{ matrix.package }} --dry-run