diff --git a/package.json b/package.json index 60d370c..ea78506 100644 --- a/package.json +++ b/package.json @@ -67,49 +67,5 @@ }, "publishConfig": { "access": "restricted" - }, - "release": { - "branches": [ - "main" - ], - "plugins": [ - [ - "@semantic-release/commit-analyzer", - { - "preset": "angular", - "releaseRules": [ - { - "type": "docs", - "release": "patch" - }, - { - "type": "refactor", - "release": "patch" - }, - { - "type": "style", - "release": "patch" - }, - { - "type": "chore", - "release": "patch" - }, - { - "type": "perf", - "release": "patch" - } - ], - "parserOpts": { - "noteKeywords": [ - "BREAKING CHANGE", - "BREAKING CHANGES" - ] - } - } - ], - "@semantic-release/release-notes-generator", - "@semantic-release/npm", - "@semantic-release/github" - ] } } diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..0f62b25 --- /dev/null +++ b/release.config.js @@ -0,0 +1,148 @@ +module.exports = { + branches: [ + 'main', + 'next', + { + name: 'rc', + channel: 'rc', + prerelease: 'rc', + }, + { + name: 'beta', + channel: 'beta', + prerelease: 'beta', + }, + ], + plugins: [ + [ + '@semantic-release/commit-analyzer', + { + preset: 'conventionalcommits', + releaseRules: [ + { + type: 'refactor', + release: 'patch', + }, + { + type: 'docs', + scope: 'README', + release: 'patch', + }, + { + type: 'test', + release: 'patch', + }, + { + type: 'style', + release: 'patch', + }, + { + type: 'perf', + release: 'patch', + }, + { + type: 'ci', + release: 'patch', + }, + { + type: 'build', + release: 'patch', + }, + { + type: 'chore', + release: 'patch', + }, + { + type: 'no-release', + release: false, + }, + ], + parserOpts: { + noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'], + }, + }, + ], + [ + '@semantic-release/release-notes-generator', + { + preset: 'conventionalcommits', + parserOpts: { + noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'], + }, + writerOpts: { + commitsSort: ['subject', 'scope'], + }, + presetConfig: { + types: [ + { + type: 'feat', + section: ':sparkles: Features', + hidden: false, + }, + { + type: 'fix', + section: ':bug: Fixes', + hidden: false, + }, + { + type: 'docs', + section: ':memo: Documentation', + hidden: false, + }, + { + type: 'style', + section: ':barber: Code-style', + hidden: false, + }, + { + type: 'refactor', + section: ':zap: Refactor', + hidden: false, + }, + { + type: 'perf', + section: ':fast_forward: Performance', + hidden: false, + }, + { + type: 'test', + section: ':white_check_mark: Tests', + hidden: false, + }, + { + type: 'ci', + section: ':repeat: CI', + hidden: false, + }, + { + type: 'chore', + section: ':repeat: Chore', + hidden: false, + }, + { + type: 'build', + section: ':wrench: Build', + hidden: false, + }, + ], + }, + }, + ], + '@semantic-release/npm', + [ + '@semantic-release/github', + { + assets: [ + { + path: 'radix-connect.zip', + label: 'radix-connect.zip', + }, + { + path: 'radix-connect-dev.zip', + label: 'radix-connect-dev.zip', + }, + ], + }, + ], + ], +}