mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-15 10:17:54 +08:00
36 lines
789 B
JavaScript
36 lines
789 B
JavaScript
const branch = process.env.GITHUB_REF_NAME;
|
|
|
|
const config = {
|
|
branches: ["main", { name: "next", prerelease: true }],
|
|
plugins: [
|
|
"@semantic-release/commit-analyzer",
|
|
"@semantic-release/release-notes-generator",
|
|
],
|
|
};
|
|
|
|
if (
|
|
config.branches.some(
|
|
(it) => it === branch || (it.name === branch && !it.prerelease)
|
|
)
|
|
) {
|
|
config.plugins.push("@semantic-release/changelog", [
|
|
[
|
|
"@semantic-release/exec",
|
|
{
|
|
prepare: "npx prettier -w CHANGELOG.md",
|
|
},
|
|
],
|
|
"@semantic-release/git",
|
|
{
|
|
assets: ["CHANGELOG.md"],
|
|
message:
|
|
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
|
},
|
|
"@semantic-release/github",
|
|
]);
|
|
}
|
|
|
|
config.plugins.push("@semantic-release/npm");
|
|
|
|
module.exports = config;
|