@halospv3/hce.shared-config
Version:
Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are als
65 lines (64 loc) • 2.38 kB
JavaScript
import { DefaultOptions } from "./setupGitPluginSpec.default.mjs";
//#region src/semanticReleaseConfig.ts
/**
* @satisfies { Readonly<PluginSpec[]> }
*/
const defaultPlugins = Object.freeze([
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"
]);
/**
* The base configuration for various Semantic Release scenarios.
* - Prefers preset "conventionalcommits"
* (Conventional-Changelog-ConventionalCommits).
* - Creates tags and release commits on "main" branch, pre-releases on
* "develop" branch in "develop" channel.
* - Creates GitHub Releases.
* - Exports the following variables as GitHub Actions outputs:
* - "new-release-published": "true" | "false"
* - "new-release-version" : string
* - "new-release-git-tag" : string
* - includes default plugins (except `@semantic-release/npm`) and more
* - `@semantic-release/commit-analyzer`
* - semantic-release-export-data
* - `@semantic-release/release-notes-generator`
* - `@semantic-release/changelog`
* - `@semantic-release/git`
* - add modified CHANGELOG.md in release commit
* - `@semantic-release/exec`
* - does nothing by default. Included for convenience.
* - `@semantic-release/github`
* - uploads all files from `./publish/*`. This is non-recursive.
* - adds a list of links to related release pages (e.g. the release's page on npmjs.com)
*
* (OPTIONAL) update static Version strings before Git plugin
* - https://github.com/jpoehnelt/semantic-release-replace-plugin
* - https://github.com/droidsolutions/semantic-release-update-file
* @satisfies {Options}
*/
const baseConfig = {
/** @see https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugin-options-configuration */
preset: "conventionalcommits",
branches: ["main", {
name: "develop",
channel: "develop",
prerelease: true
}],
plugins: [
["@semantic-release/commit-analyzer", {}],
["semantic-release-export-data", {}],
["@semantic-release/release-notes-generator", {}],
["@semantic-release/changelog", {}],
["@semantic-release/git", DefaultOptions],
["@semantic-release/exec", {}],
["@semantic-release/github", {
addReleases: "bottom",
assets: ["./publish/*", "!./publish/.gitkeep"]
}]
]
};
//#endregion
export { baseConfig, defaultPlugins };
//# sourceMappingURL=semanticReleaseConfig.mjs.map