- Add .releaserc.json: conventional commits -> semantic version bump (major/minor/patch), updates Cargo.toml + Cargo.lock version, writes CHANGELOG.md, commits as 'chore(release): X.Y.Z [skip ci]' - Add release.yml: runs semantic-release on main push, then triggers publish.yml via workflow_dispatch with the new tag - Update publish.yml: add workflow_dispatch input (tag) so release workflow can trigger publish directly (GITHUB_TOKEN tag pushes do not trigger 'on: push: tags'); still supports manual tag pushes
18 lines
605 B
JSON
18 lines
605 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 --locked"
|
|
}],
|
|
["@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": []
|
|
}]
|
|
]
|
|
} |