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).
19 lines
755 B
JSON
19 lines
755 B
JSON
{
|
|
"branches": ["main"],
|
|
"plugins": [
|
|
"@semantic-release/commit-analyzer",
|
|
"@semantic-release/release-notes-generator",
|
|
"@semantic-release/changelog",
|
|
["@semantic-release/exec", {
|
|
"prepareCmd": "sed -i 's/^version = \\\"[^\\\"]*\\\"/version = \\\"${nextRelease.version}\\\"/' Cargo.toml && cargo check",
|
|
"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"],
|
|
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
}],
|
|
["@semantic-release/github", {
|
|
"assets": []
|
|
}]
|
|
]
|
|
} |