From 6e100e2e9d84e7b0e1aa71064b77510b83913a40 Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Mon, 23 Mar 2020 21:38:16 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Adds=20Auto-generated=20Release?= =?UTF-8?q?=20Notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release.config.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/release.config.js b/release.config.js index c9a9138..cd64506 100644 --- a/release.config.js +++ b/release.config.js @@ -1,3 +1,13 @@ +const { promisify } = require('util'); +const joinPath = require('path').join; +const dateFormat = require('dateformat'); +const readFileAsync = promisify(require('fs').readFile); + +const TEMPLATE_DIR = "node_modules/semantic-release-gitmoji/lib/assets/templates/" + +const template = readFileAsync(joinPath(TEMPLATE_DIR, 'default-template.hbs')); +const commitTemplate = readFileAsync(joinPath(TEMPLATE_DIR, 'commit-template.hbs')); + module.exports = { branches: [ "+([0-9])?(.{+([0-9]),x}).x", @@ -13,6 +23,20 @@ module.exports = { major: ["💥"], minor: ["✨", "🏗", "⚡"], patch: ["🐛", "🚑", "🔒", "♻", "💚", "⬆", "⬇", "➕", "➖", "🔧", "📝", "🔥", "👷‍♂️", "🔨", "⏪", "🚚"] + }, + releaseNotes: { + template: 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' + } } } ],