From c2dc88b52d03608e5a717fc4ebbb67a0e762badb Mon Sep 17 00:00:00 2001 From: Alexander Khramov Date: Mon, 9 Sep 2024 16:04:12 +0300 Subject: [PATCH 1/4] fix: use .npmrc instead of publishConfig --- .npmrc | 3 +++ packages/constants/package.json | 5 ----- packages/contracts/package.json | 5 ----- packages/fetch/package.json | 5 ----- packages/helpers/package.json | 5 ----- 5 files changed, 3 insertions(+), 20 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..941c95d --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +registry = https://registry.npmjs.org/ +access = public +workspaces-update = false diff --git a/packages/constants/package.json b/packages/constants/package.json index f7f2110..69d5b27 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -21,11 +21,6 @@ "lido-js-sdk", "lidofinance" ], - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public", - "workspaces-update": false - }, "devDependencies": { "@types/jest": "^27.0.2" }, diff --git a/packages/contracts/package.json b/packages/contracts/package.json index dda76ef..281841e 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -24,11 +24,6 @@ "scripts": { "typechain": "typechain --target=ethers-v5 --out-dir ./src/generated './src/abi/*.json'" }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public", - "workspaces-update": false - }, "devDependencies": { "@ethersproject/abi": "^5.4.1", "@ethersproject/abstract-signer": "^5.4.0", diff --git a/packages/fetch/package.json b/packages/fetch/package.json index 7d9744a..ce0c82e 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -21,11 +21,6 @@ "lido-js-sdk", "lidofinance" ], - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public", - "workspaces-update": false - }, "devDependencies": { "@types/jest": "^27.0.2", "@types/node-fetch": "^2.5.12" diff --git a/packages/helpers/package.json b/packages/helpers/package.json index c101cf5..f8ab0f4 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -21,11 +21,6 @@ "lido-js-sdk", "lidofinance" ], - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public", - "workspaces-update": false - }, "devDependencies": { "@ethersproject/bignumber": "^5.4.2", "@types/jest": "^27.0.2" From fc3ae1e445e80b66b4b7843bb5d480d3fcd606ea Mon Sep 17 00:00:00 2001 From: Alexander Khramov Date: Mon, 9 Sep 2024 17:49:36 +0300 Subject: [PATCH 2/4] fix: setup .npmrc during deploy workflow --- .github/workflows/deploy.yml | 8 ++++++++ .npmrc | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 .npmrc diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3fefd46..bc1e865 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,8 +29,16 @@ jobs: run: yarn build - name: Run tests run: yarn test + - name: Setup .npmrc + run: | + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc + echo "workspaces-update=false" >> .npmrc + echo "provenance=true" >> .npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish to NPM env: + NPM_CONFIG_PROVENANCE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 941c95d..0000000 --- a/.npmrc +++ /dev/null @@ -1,3 +0,0 @@ -registry = https://registry.npmjs.org/ -access = public -workspaces-update = false From 33cf1257c065137fcb33d00844afcdac1b610299 Mon Sep 17 00:00:00 2001 From: Alexander Khramov Date: Mon, 9 Sep 2024 18:35:40 +0300 Subject: [PATCH 3/4] fix: rm npm config provenance --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bc1e865..14c9842 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,12 +33,10 @@ jobs: run: | echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc echo "workspaces-update=false" >> .npmrc - echo "provenance=true" >> .npmrc env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish to NPM env: - NPM_CONFIG_PROVENANCE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init From 2ddc5a22bb04de6772d537390abf2aee77205496 Mon Sep 17 00:00:00 2001 From: Alexander Khramov Date: Mon, 9 Sep 2024 18:45:14 +0300 Subject: [PATCH 4/4] fix: return publishConfig back --- packages/constants/package.json | 4 ++++ packages/contracts/package.json | 4 ++++ packages/fetch/package.json | 4 ++++ packages/helpers/package.json | 4 ++++ packages/providers/package.json | 3 +-- packages/react/package.json | 3 +-- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/constants/package.json b/packages/constants/package.json index 69d5b27..0d7d2c8 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -21,6 +21,10 @@ "lido-js-sdk", "lidofinance" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, "devDependencies": { "@types/jest": "^27.0.2" }, diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 281841e..2c8abb8 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -21,6 +21,10 @@ "lido-js-sdk", "lidofinance" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, "scripts": { "typechain": "typechain --target=ethers-v5 --out-dir ./src/generated './src/abi/*.json'" }, diff --git a/packages/fetch/package.json b/packages/fetch/package.json index ce0c82e..7fca23a 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -21,6 +21,10 @@ "lido-js-sdk", "lidofinance" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, "devDependencies": { "@types/jest": "^27.0.2", "@types/node-fetch": "^2.5.12" diff --git a/packages/helpers/package.json b/packages/helpers/package.json index f8ab0f4..c9b3598 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -21,6 +21,10 @@ "lido-js-sdk", "lidofinance" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, "devDependencies": { "@ethersproject/bignumber": "^5.4.2", "@types/jest": "^27.0.2" diff --git a/packages/providers/package.json b/packages/providers/package.json index 10baaa8..d9c5507 100644 --- a/packages/providers/package.json +++ b/packages/providers/package.json @@ -23,8 +23,7 @@ ], "publishConfig": { "registry": "https://registry.npmjs.org/", - "access": "public", - "workspaces-update": false + "access": "public" }, "devDependencies": { "@ethersproject/logger": "^5.4.0", diff --git a/packages/react/package.json b/packages/react/package.json index baa5b40..badea6b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -23,8 +23,7 @@ ], "publishConfig": { "registry": "https://registry.npmjs.org/", - "access": "public", - "workspaces-update": false + "access": "public" }, "devDependencies": { "@ethersproject/bignumber": "^5.4.2",