From 1e0991a74a0d396a51d8662826182d768044c38d Mon Sep 17 00:00:00 2001 From: Tim Dittler Date: Mon, 10 Mar 2025 14:23:20 +0100 Subject: [PATCH 1/2] Fix NPM publishing --- .github/workflows/publish-npm.yml | 5 +++-- .npmrc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 942d1a3..550ade3 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -4,7 +4,8 @@ on: types: [created] permissions: - contents: write # we need to read secrets + contents: read # we need to read secrets + id-token: write jobs: build: @@ -17,6 +18,6 @@ jobs: with: registry-url: 'https://registry.npmjs.org' - name: Publish package on NPM 📦 - run: npm publish + run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.npmrc b/.npmrc index e511e2c..ababd7a 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,3 @@ -@staffbase:registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} +registry=https://registry.npmjs.org/ always-auth=true -//registry.npmjs.org/:_authToken=${NPM_TOKEN} From 051b770ec84811a9f47a8b2b41fd58e62066d1f6 Mon Sep 17 00:00:00 2001 From: Tim Dittler Date: Mon, 10 Mar 2025 14:29:50 +0100 Subject: [PATCH 2/2] Remove .npmrc to not influence local development --- .npmrc | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index ababd7a..0000000 --- a/.npmrc +++ /dev/null @@ -1,3 +0,0 @@ -//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} -registry=https://registry.npmjs.org/ -always-auth=true