This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
release.config.cjs
64 lines (60 loc) · 2.02 KB
/
release.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* Copyright 2020 Design Barn Inc.
*/
/* eslint-disable max-len */
const pkg = require('./package.json');
const CHANGELOG_HEADER = `# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://github.com/semantic-release/semantic-release).
`;
const SUCCESS_COMMENT = `:tada: This \${issue.pull_request ? 'pull request is included' : 'issue is fixed'} in v\${nextRelease.version}, available on npm: [${pkg.name}@\${nextRelease.version}](https://www.npmjs.com/package/${pkg.name}).`;
/**
* See:
* https://semantic-release.gitbook.io/semantic-release/
* https://github.com/semantic-release/npm
* https://github.com/semantic-release/github
* https://github.com/semantic-release/git
* https://github.com/semantic-release/release-notes-generator
* https://github.com/semantic-release/commit-analyzer
* https://github.com/semantic-release/changelog
*/
module.exports = {
branches: ['main', { name: 'beta', prerelease: true }],
// eslint-disable-next-line no-template-curly-in-string
tagFormat: 'v${version}',
ci: true,
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
},
],
'@semantic-release/release-notes-generator',
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
changelogTitle: CHANGELOG_HEADER,
},
],
'@semantic-release/git',
[
'@semantic-release/github',
{
// eslint-disable-next-line no-template-curly-in-string
message: 'chore(release): v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
assets: 'dist/*.tgz',
successComment: SUCCESS_COMMENT,
addReleases: 'bottom',
},
],
[
'@semantic-release/npm',
{
npmPublish: true,
tarballDir: 'dist',
},
],
],
};