Skip to content

Commit 4628183

Browse files
committed
fix: remove recursive publish scripts causing double publish in CI
The 'publish' npm scripts in contracts and SDK package.json files caused npm to recursively call itself during the publish lifecycle: 1. npm publish runs 2. prepack hook runs (build) 3. npm finds 'publish' script and runs it 4. 'publish' script is 'npm publish' → starts whole process again! 5. Second publish fails with 403 (already published) Removing these scripts allows npm publish to run once without recursion. Signed-off-by: Miguel_LZPF <[email protected]>
1 parent 26421ab commit 4628183

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@hashgraph/asset-tokenization-contracts": patch
3+
"@hashgraph/asset-tokenization-sdk": patch
4+
---
5+
6+
fix: CI workflow improvements for reliable releases
7+
8+
1. **Fixed --ignore pattern in ats.release.yml**: Changed from non-existent
9+
`@hashgraph/mass-payout*` to correct `@mass-payout/*` package namespace
10+
11+
2. **Simplified publish trigger in ats.publish.yml**: Changed from
12+
`release: published` to `push.tags` for automatic publishing on tag push
13+
(no need to manually create GitHub release)
14+
15+
3. **Removed recursive publish scripts**: Removed `"publish": "npm publish"`
16+
from contracts and SDK package.json files that caused npm to recursively
17+
call itself during publish lifecycle, resulting in 403 errors in CI

packages/ats/contracts/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
"deploy:hedera:mainnet": "NETWORK=hedera-mainnet npm run deploy",
6868
"local:hardhat": "npx hardhat node",
6969
"deploy:hardhat": "npx hardhat run scripts/cli/hardhat.ts",
70-
"publish": "npm publish",
7170
"compile": "npx hardhat compile",
7271
"compile:traces": "npx hardhat --show-stack-traces compile",
7372
"compile:force": "npx hardhat compile --force",

packages/ats/sdk/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"build": "rimraf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && tsc -p tsconfig.cjs.json && tsc-alias -p tsconfig.cjs.json",
2323
"test": "NODE_OPTIONS=--max-old-space-size=16384 npx jest --ci --runInBand --detectOpenHandles --forceExit",
2424
"clean": "npm run clean:build && npm run clean:cache && npm run clean:coverage",
25-
"publish": "npm publish",
2625
"prepack": "npm run build",
2726
"clean:build": "npx --yes rimraf build",
2827
"clean:cache": "npx --yes rimraf cache",

0 commit comments

Comments
 (0)