Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Semantic Release CI config again #521

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .releaserc

This file was deleted.

74 changes: 74 additions & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/**
* config for Semantic Release workflow
* docs: https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration
**/

module.exports = {
branches: ['main'],
dryRun: false,
plugins: [
// determine what type of semver change this commit may generate
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
// see default rules: https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-rules.js
releaseRules: [
// while in "alpha" mode don't increment the major version
{ breaking: true, release: 'minor' },
{ type: 'feat', release: 'patch' },
{ type: 'fix', release: 'patch' },
{ type: 'perf', release: 'patch' },
],
},
],
// create CHANGELOG text for changelog and commit description
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits',
presetConfig: {
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Fixes' },
{ type: 'chore', hidden: false, section: 'Other' },
{ type: 'docs', hidden: false, section: 'Other' },
{ type: 'style', hidden: false, section: 'Other' },
{ type: 'refactor', hidden: false, section: 'Other' },
{ type: 'perf', hidden: false, section: 'Other' },
{ type: 'revert', hidden: false, section: 'Other ' },
{ type: 'test', hidden: false, section: 'Other ' },
{ type: 'build', hidden: false, section: 'Other' },
{ type: 'ci', hidden: true },
],
},
},
],
// edits CHANGELOG.md
[
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
changelogTitle: '# Changelog',
},
],
// edits package.json and package-lock.json
[
'@semantic-release/npm',
{
npmPublish: false,
},
],
// creates git commit and tag
[
'@semantic-release/git',
{
assets: ['CHANGELOG.md', 'package.json', 'package-lock.json'],
message:
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],
// creates github release from git tag
'@semantic-release/github',
],
};
Loading