Skip to content

Commit ab58e3d

Browse files
committed
fix: fix release process to include artifacts/*.json folder
1 parent afb3f8f commit ab58e3d

File tree

29 files changed

+76
-48
lines changed

29 files changed

+76
-48
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@ jobs:
5959
# - state variables (`StateVariables`)
6060
# - the typed ABIs that can be exported in ESM / common JS
6161
#
62+
# We want the `artifacts/` folder to be in the format `artifacts/*.json`. So we need to run `npm run build:package` twice:
63+
# - 1st time so that `npm run build:types` generate the typed ABIs consumed from `artifacts/*.json`
64+
# - 2nd time to regenerate the `artifacs/*.json` structure as `npm run build:js` cleans the `artifacts/` folder, re-compile the contracts and regenerate artifacts with `artifacts/**/*.json` structure
6265
- name: Prepare artifacts to publish
6366
if: ${{ steps.release.outputs.releases_created }}
6467
run: |
65-
npm run build:package
68+
npm run build:package
6669
npm run build:types
6770
npm run build:js
71+
npm run build:package
6872
6973
- name: Publish on NPM
7074
if: ${{ steps.release.outputs.releases_created }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"build:js": "turbo build:js",
3333
"build:types": "turbo build:types",
3434
"build:package": "turbo build:package",
35-
"clean": "turbo clean",
35+
"clean": "turbo clean && rm -Rf .turbo/ cache/",
3636
"format": "prettier --write .",
3737
"lint": "turbo lint",
3838
"lint:solidity": "turbo lint:solidity",

packages/lsp-smart-contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"contracts/**/*.sol",
2222
"!contracts/Mocks/**/*.sol",
2323
"artifacts/*.json",
24-
"dist"
24+
"dist",
25+
"./README.md"
2526
],
2627
"main": "./dist/constants.cjs",
2728
"module": "./dist/constants.mjs",
@@ -57,7 +58,7 @@
5758
"build:js": "unbuild",
5859
"build:types": "wagmi generate",
5960
"build:docs": "hardhat dodoc && prettier -w ./docs && bash dodoc/postProcessingContracts.sh && dodoc/postProcessingLibraries.sh",
60-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
61+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
6162
"format": "prettier --write .",
6263
"lint": "eslint . --ext .ts,.js",
6364
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",

packages/lsp0-contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"!contracts/Mocks/**/*.sol",
2020
"artifacts/*.json",
2121
"compatibility-abis",
22-
"dist"
22+
"dist",
23+
"./README.md"
2324
],
2425
"main": "./dist/constants.cjs",
2526
"module": "./dist/constants.mjs",
@@ -48,7 +49,7 @@
4849
"build": "hardhat compile --show-stack-traces",
4950
"build:js": "unbuild",
5051
"build:types": "wagmi generate",
51-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
52+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
5253
"format": "prettier --write .",
5354
"lint": "eslint . --ext .ts,.js",
5455
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",

packages/lsp1-contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"contracts/**/*.sol",
1919
"!contracts/Mocks/**/*.sol",
2020
"artifacts/*.json",
21-
"dist"
21+
"dist",
22+
"./README.md"
2223
],
2324
"main": "./dist/constants.cjs",
2425
"module": "./dist/constants.mjs",
@@ -47,7 +48,7 @@
4748
"build": "hardhat compile --show-stack-traces",
4849
"build:js": "unbuild",
4950
"build:types": "wagmi generate",
50-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
51+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
5152
"format": "prettier --write .",
5253
"lint": "eslint . --ext .ts,.js",
5354
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",

packages/lsp10-contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"scripts": {
3737
"build": "hardhat compile --show-stack-traces",
3838
"build:js": "unbuild",
39-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
39+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
4040
"format": "prettier --write .",
4141
"lint": "eslint . --ext .ts,.js",
4242
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'"

packages/lsp11-contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"contracts/**/*.sol",
1919
"!contracts/Mocks/**/*.sol",
2020
"artifacts/*.json",
21-
"dist"
21+
"dist",
22+
"./README.md"
2223
],
2324
"main": "./dist/constants.cjs",
2425
"module": "./dist/constants.mjs",
@@ -48,7 +49,7 @@
4849
"build:foundry": "forge build",
4950
"build:js": "unbuild",
5051
"build:types": "wagmi generate",
51-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
52+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
5253
"format": "prettier --write .",
5354
"lint": "eslint . --ext .ts,.js",
5455
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",

packages/lsp12-contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"scripts": {
3737
"build": "hardhat compile --show-stack-traces",
3838
"build:js": "unbuild",
39-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
39+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
4040
"format": "prettier --write .",
4141
"lint": "eslint . --ext .ts,.js",
4242
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'"

packages/lsp14-contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"contracts/**/*.sol",
1919
"!contracts/Mocks/**/*.sol",
2020
"artifacts/*.json",
21-
"dist"
21+
"dist",
22+
"./README.md"
2223
],
2324
"main": "./dist/constants.cjs",
2425
"module": "./dist/constants.mjs",
@@ -47,7 +48,7 @@
4748
"build": "hardhat compile --show-stack-traces",
4849
"build:js": "unbuild",
4950
"build:types": "wagmi generate",
50-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
51+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
5152
"format": "prettier --write .",
5253
"lint": "eslint . --ext .ts,.js",
5354
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",

packages/lsp16-contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"contracts/**/*.sol",
1919
"!contracts/Mocks/**/*.sol",
2020
"artifacts/*.json",
21-
"dist"
21+
"dist",
22+
"./README.md"
2223
],
2324
"main": "./dist/dist.cjs",
2425
"module": "./dist/dist.mjs",
@@ -48,7 +49,7 @@
4849
"build:foundry": "forge build",
4950
"build:js": "unbuild",
5051
"build:types": "wagmi generate",
51-
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
52+
"clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/ abi.ts",
5253
"format": "prettier --write .",
5354
"lint": "eslint . --ext .ts,.js",
5455
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",

0 commit comments

Comments
 (0)