Skip to content

Commit

Permalink
build(release): improve release logic
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed May 2, 2022
1 parent 194d59b commit 3704eb7
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 12 deletions.
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vsce",
"version": "0.0.0",
"version": "0.0.0-development",
"description": "VSCode Extension Manager",
"repository": {
"type": "git",
Expand Down Expand Up @@ -74,6 +74,7 @@
"@types/xml2js": "^0.4.4",
"@types/yauzl": "^2.9.2",
"@types/yazl": "^2.4.2",
"conventional-changelog-conventionalcommits": "^4.6.3",
"husky": "^7.0.4",
"mocha": "^9.2.0",
"npm-run-all": "^4.1.5",
Expand All @@ -97,11 +98,6 @@
"singleQuote": true,
"arrowParens": "avoid"
},
"release": {
"branches": [
"main"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
Expand Down
73 changes: 73 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
module.exports = {
branches: ['main'],
preset: 'conventionalcommits',
plugins: [
[
'@semantic-release/commit-analyzer',
{
releaseRules: [
{
type: 'perf',
release: 'patch',
},
{
type: 'refactor',
release: 'patch',
},
{
type: 'build',
scope: 'deps',
release: 'patch',
},
],
},
],
[
'@semantic-release/release-notes-generator',
{
presetConfig: {
types: [
{
type: 'feat',
section: 'Features',
},
{
type: 'fix',
section: 'Bug Fixes',
},
{
type: 'perf',
section: 'Performance Improvements',
},
{
type: 'revert',
section: 'Reverts',
},
{
type: 'refactor',
section: 'Code Refactoring',
},
{
type: 'build',
scope: 'deps',
section: 'Dependencies',
},
],
},
},
],
[
'@semantic-release/npm',
{
tarballDir: '.',
},
],
[
'@semantic-release/github',
{
assets: '*.tgz',
addReleases: 'bottom',
},
],
],
};

0 comments on commit 3704eb7

Please sign in to comment.