-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.config.js
55 lines (52 loc) · 1.18 KB
/
release.config.js
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
const ref = process.env.GITHUB_REF;
const branch = ref.split('/').pop();
const config = {
branches: [
'master',
{ name: 'dev', prerelease: 'rc' },
{ name: 'alpha', prerelease: true },
],
plugins: [
'@semantic-release/commit-analyzer',
[
'@semantic-release/release-notes-generator',
{
config: './node_modules/cz-conventional-changelog',
},
],
[
'@semantic-release/npm',
{
publish: 'false',
},
],
[
'@semantic-release/exec',
{
prepareCmd:
'tar -czvf build.tar.gz package.json build app lib prisma public styles .env.example CHANGELOG.md package-lock.json README.md remix.config.js remix.env.d.ts server.ts tailwind.config.ts tsconfig.json postcss.config.js',
},
],
[
'@semantic-release/github',
{
assets: [{ path: 'build.tar.gz', name: 'build.tar.gz' }],
},
],
],
};
if (
config.branches.some(
(it) => it === branch || (it.name === branch && !it.prerelease),
)
) {
config.plugins.push('@semantic-release/changelog', [
'@semantic-release/git',
{
assets: ['CHANGELOG.md', 'package.json'],
message:
'chore(release): ${nextRelease.version} \n\n${nextRelease.notes}',
},
]);
}
module.exports = config;