From 3c04aa44b6110c8ce15278d7dc76828c44dfc8d9 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Fri, 28 Aug 2026 17:15:06 +0700 Subject: [PATCH] fix(release): dispatch publish via gh api in exec successCmd gh workflow run failed inside successCmd (exit 1, no output shown). Switch to gh api REST dispatch which is transparent and reliable. successCmd only runs after semantic-release actually publishes a new version, so this fires once per release, exactly on the new tag. Remove the separate Detect step (it depended on git state that is not updated by semantic-release). --- .releaserc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.releaserc.json b/.releaserc.json index 006f1a9..168a606 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -6,7 +6,7 @@ "@semantic-release/changelog", ["@semantic-release/exec", { "prepareCmd": "sed -i 's/^version = \\\"[^\\\"]*\\\"/version = \\\"${nextRelease.version}\\\"/' Cargo.toml && cargo check", - "successCmd": "echo \"::notice::release ${nextRelease.version} published; dispatching crate publish\" && gh workflow run publish.yml --ref main -f tag=v${nextRelease.version}" + "successCmd": "gh api -X POST repos/${GITHUB_REPOSITORY}/actions/workflows/publish.yml/dispatches -f ref=main -f 'inputs[tag]=v${nextRelease.version}'" }], ["@semantic-release/git", { "assets": ["Cargo.toml", "Cargo.lock", "CHANGELOG.md"],