ci: add GitHub Actions workflows with semantic-release auto-versioning
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
module.exports = {
|
||||
branches: ["main"],
|
||||
plugins: [
|
||||
[
|
||||
"@semantic-release/commit-analyzer",
|
||||
{
|
||||
preset: "angular",
|
||||
releaseRules: [
|
||||
{ type: "chore", release: "patch" },
|
||||
{ type: "docs", release: "patch" },
|
||||
{ type: "refactor", release: "patch" },
|
||||
{ type: "test", release: "patch" },
|
||||
{ type: "style", release: "patch" },
|
||||
{ type: "perf", release: "patch" },
|
||||
{ type: "ci", release: "patch" },
|
||||
],
|
||||
},
|
||||
],
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
prepareCmd:
|
||||
'sed -i \'s/^version = ".*"/version = "${nextRelease.version}"/\' Cargo.toml && cargo check',
|
||||
publishCmd: "cargo build --release",
|
||||
},
|
||||
],
|
||||
[
|
||||
"@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: [
|
||||
{
|
||||
path: "target/release/zesdex",
|
||||
label: "zesdex-${nextRelease.version}-linux-amd64",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user