-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
252 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
const { promisify } = require('util') | ||
const path = require('path'); | ||
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 = '/lib/assets/templates' | ||
|
||
// 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 = { | ||
branches: ['master', 'dev'], | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
'@semantic-release/release-notes-generator', | ||
[ | ||
'@semantic-release/changelog', | ||
{ | ||
changelogFile: 'docs/CHANGELOG.md', | ||
}, | ||
], | ||
[ | ||
'@semantic-release/git', | ||
{ | ||
assets: ['docs/CHANGELOG.md'], | ||
}, | ||
], | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
assets: [ | ||
{ | ||
path: 'src', | ||
label: 'styled-roam', | ||
}, | ||
], | ||
addReleases: 'top', | ||
}, | ||
], | ||
[ | ||
'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) | ||
}, | ||
}, | ||
issueResolution: { | ||
template: '{baseUrl}/{owner}/{repo}/issues/{ref}', | ||
baseUrl: 'https://github.com', | ||
source: 'github.com', | ||
}, | ||
}, | ||
}, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[`{{commit.short}}`](https://github.com/{{owner}}/{{repo}}/commit/{{commit.short}}) {{subject}} {{#if issues}}(Issues:{{#each issues}} [`{{text}}`]({{link}}){{/each}}){{/if}}{{#if wip}}{{#each wip}} | ||
- [`{{commit.short}}`](https://github.com/{{owner}}/{{repo}}/commit/{{commit.short}}) {{subject}}{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{#if compareUrl}} | ||
# [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}}) | ||
{{else}} | ||
# v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}}) | ||
{{/if}} | ||
|
||
{{#with commits}} | ||
{{#if sparkles}} | ||
## ✨ New Features | ||
{{#each sparkles}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if bug}} | ||
## 🐛 Bug Fixes | ||
{{#each bug}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if ambulance}} | ||
## 🚑 Critical Hotfixes | ||
{{#each ambulance}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if lock}} | ||
## 🔒 Security Issues | ||
{{#each lock}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if boom}} | ||
## 💥 Breaking Changes | ||
{{#each boom}} | ||
- {{> commitTemplate}} | ||
{{/each}} | ||
{{/if}} | ||
{{/with}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.
139cf9a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: