UNPKG

@halospv3/hce.shared-config

Version:

Automate commit message quality, changelogs, and CI/CD releases. Exports a semantic-release shareable configuration deserialized from this package's '.releaserc.yml'. Shared resources for .NET projects are also distributed with this package.

64 lines (59 loc) 2.64 kB
import { DefaultOptions } from './setupGitPluginSpec.mjs'; /** * A two-type PluginSpec to tie a plugin's name to its Options type. This is * intended for use by plugins to associate their Options type with their plugin * name. */ /** * @satisfies { Readonly<PluginSpec[]> } */ const defaultPlugins = Object.freeze(['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']); // define as const for string literals in type, then... /** * @see baseConfig */ 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'] }]] }; /** * 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 = _baseConfig; export { baseConfig, defaultPlugins }; //# sourceMappingURL=semanticReleaseConfig.mjs.map