Skip to content

Commit 1666ab7

Browse files
authored
fix: prevent release failure when SDK version already published (#145)
The release script runs `npm publish` for the SDK sub-package after `changeset publish`. If the SDK version is already on npm (e.g. from a prior release run), npm returns 403 and fails the whole CI job. Redirect stderr and fall back gracefully so the Release action stays green on re-runs. Fixes the failing Release action: https://github.com/ReScienceLab/agent-world-network/actions/runs/23436588741
1 parent 7fedf57 commit 1666ab7

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@resciencelab/agent-world-network": patch
3+
---
4+
5+
fix: prevent release failure when SDK version already published

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build": "tsc",
3636
"dev": "tsc --watch",
3737
"version": "changeset version && node scripts/sync-version.mjs",
38-
"release": "npm run build && npm --prefix packages/agent-world-sdk run build && changeset publish && cd packages/agent-world-sdk && npm publish --access public",
38+
"release": "npm run build && npm --prefix packages/agent-world-sdk run build && changeset publish && cd packages/agent-world-sdk && (npm publish --access public 2>/dev/null || echo 'SDK already published, skipping')",
3939
"prepublishOnly": "npm run build"
4040
},
4141
"publishConfig": {

0 commit comments

Comments
 (0)