scratch-semantic-release-co.../release.config.js
Christopher Willis-Ford a5d298de3b fix: work around semantic-release/npm plugin prepack issue
There's an issue where the `npm` plugin for `semantic-release`
effectively runs `npm prepack` twice when `tarballDir` is set. Worse, if
the `tarballDir` is within the package directory and not excluded (by
`.npmignore`, for example) then the tarball from the first `prepack`
will end up inside the tarball for the second `prepack`, effectively
doubling the package size.

See https://github.com/semantic-release/npm/issues/535
2024-09-10 12:59:50 -07:00

34 lines
1.2 KiB
JavaScript

module.exports = {
branches: ['main'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/changelog',
{
changelogTitle: '# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.'
}
],
[
'@semantic-release/npm',
{
// Do not set 'tarballDir' without considering this issue: https://github.com/semantic-release/npm/issues/535
}
],
[
'@semantic-release/git',
{
// eslint-disable-next-line no-template-curly-in-string
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n' +
'${(nextRelease.notes.length < 32000) ? ' +
'nextRelease.notes : (nextRelease.notes.slice(0,32000) + "...\\n\\n(Notes too long. Truncated.)")}'
}
],
[
'@semantic-release/github',
{
assets: 'pack/*.tgz'
}
]
]
};