Skip to content

Commit

Permalink
Merge pull request #1 from azcraze/feat-semantic-release
Browse files Browse the repository at this point in the history
Feat semantic release
  • Loading branch information
azcraze authored Mar 27, 2023
2 parents f03ff5a + cb87a37 commit e402ff4
Show file tree
Hide file tree
Showing 4 changed files with 7,600 additions and 1,245 deletions.
2 changes: 1 addition & 1 deletion .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ module.exports = {
defaultIssues: '',
defaultScope: '',
defaultSubject: ''
}
}
63 changes: 44 additions & 19 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
// in ".releaserc.js" or "release.config.js"

const { promisify } = require('util')
const dateFormat = require('dateformat')
const readFileAsync = promisify(require('fs').readFile)

// Given a `const` variable `TEMPLATE_DIR` which points to "<semantic-release-gitmoji>/lib/assets/templates"
const TEMPLATE_DIR = './node_modules/semantic-release-gitmoji'
// the *.hbs template and partials should be passed as strings of contents
const template = readFileAsync(path.join(TEMPLATE_DIR, 'default-template.hbs'))
const commitTemplate = readFileAsync(path.join(TEMPLATE_DIR, 'commit-template.hbs'))

module.exports = {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/git",
[
"@semantic-release/release-notes-generator",
{
"preset": "angular",
"writerOpts": {
"commitsSort": ["subject", "scope"]
'branches': ['main', 'devleop']
plugins: [
[
'semantic-release-gitmoji', {
releaseRules: {
major: [ ':boom:' ],
minor: [ ':sparkles:' ],
patch: [
':bug:',
':ambulance:',
':lock:'
]
},
releaseNotes: {
template,
partials: { commitTemplate },
helpers: {
datetime: function (format = 'UTC:yyyy-mm-dd') {
return dateFormat(new Date(), format)
}
},
"template": "./path/to/release-notes-template.hbs"
issueResolution: {
template: '{baseUrl}/{owner}/{repo}/issues/{ref}',
baseUrl: 'https://github.com',
source: 'github.com',
removeFromCommit: false,
regex: /#\d+/g
}
}
],
"@semantic-release/github"
}
],
"git": {
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${body}\n\n${footer}\n",
"assets": ["CHANGELOG.md"],
"commitHooks": ["npm run lint"]
}
}

'@semantic-release/github',
'@semantic-release/npm'
]
}
Loading

0 comments on commit e402ff4

Please sign in to comment.