fix(release): dispatch publish via exec successCmd not step output
The prior pattern relying on steps.semantic-release.outputs did not fire. Move the publish dispatch into @semantic-release/exec successCmd, which runs only after a release is actually published and has nextRelease.version available. Also add GH_TOKEN env for gh CLI (GITHUB_TOKEN alone is not read by gh).
This commit is contained in:
+2
-1
@@ -5,7 +5,8 @@
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
["@semantic-release/exec", {
|
||||
"prepareCmd": "sed -i 's/^version = \\\"[^\\\"]*\\\"/version = \\\"${nextRelease.version}\\\"/' Cargo.toml && cargo check"
|
||||
"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}"
|
||||
}],
|
||||
["@semantic-release/git", {
|
||||
"assets": ["Cargo.toml", "Cargo.lock", "CHANGELOG.md"],
|
||||
|
||||
Reference in New Issue
Block a user