Skip to content

Commit

Permalink
fix: release
Browse files Browse the repository at this point in the history
  • Loading branch information
elribonazo committed Sep 15, 2024
1 parent 531d5a8 commit b169685
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions ts/.releaserc.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
module.exports = {
branches: [
{
name: process.env.RELEASE_BRANCH || 'main',
channel: process.env.RC === 'true' ? 'rc' : null,
prerelease: process.env.RC === 'true' ? 'rc' : false,
// At the top of your release.config.js
const setRcPrerelease = {
prepare: async (pluginConfig, context) => {
if (process.env.RC === 'true') {
context.nextRelease.version += '-rc.' + context.nextRelease.gitTag.split('.').pop();
context.nextRelease.channel = 'rc';
context.nextRelease.type = 'prerelease';
}
],
},
};

module.exports = {
branches: ['main', 'develop', { name: 'release/*' }],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
setRcPrerelease, // Add the custom plugin here
[
'@semantic-release/npm',
{
npmPublish: true,
tarballDir: 'dist',
pkgRoot: '.',
tag: process.env.RC === 'true' ? 'rc' : 'latest',
}
},
],
'@semantic-release/github',
'@semantic-release/changelog',
[
'@semantic-release/git',
{
assets: ['CHANGELOG.md', 'package.json', 'package-lock.json'],
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
}
]
]
message:
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],
],
};

0 comments on commit b169685

Please sign in to comment.