Skip to content

Commit

Permalink
fix: Semantic Release CI config again (#521)
Browse files Browse the repository at this point in the history
fix: .releaserc seems to expect a YAML format with comments present
  • Loading branch information
dib542 authored Jan 23, 2024
1 parent 3694b4b commit 753ca3d
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 71 deletions.
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',
],
};

0 comments on commit 753ca3d

Please sign in to comment.