Skip to content

Instantly share code, notes, and snippets.

@yyynnn
Created March 17, 2020 13:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yyynnn/fbf2a6e1f0f975ed17ba50504fb4471b to your computer and use it in GitHub Desktop.
Save yyynnn/fbf2a6e1f0f975ed17ba50504fb4471b to your computer and use it in GitHub Desktop.
release.config.js
/* eslint-disable no-template-curly-in-string */
const gitlabUrl = 'https://gitlab.com'
const gitlabApiPathPrefix = '/api/v4'
const assets = [
{ path: 'index.js', label: 'JS distribution' }
]
const verifyConditions = [
['@semantic-release/changelog'],
[
'@semantic-release/git',
{
assets: ['package.json', 'CHANGELOG.md'],
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}
],
[
'@semantic-release/gitlab',
{
gitlabUrl,
gitlabApiPathPrefix,
assets
}
]
]
const analyzeCommits = [[
'@semantic-release/commit-analyzer',
{
preset: 'angular',
releaseRules: './config/cz-coventional-changelog-custom/rules.js'
}
]]
const generateNotes = ['@semantic-release/release-notes-generator']
const prepare = [
'@semantic-release/changelog',
["@semantic-release/npm", { // this here is just for package.log update
"npmPublish": false,
}],
[
'@semantic-release/git',
{
assets: ['package.json', 'CHANGELOG.md'],
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}
]
]
const publish = [[
'@semantic-release/gitlab',
{
gitlabUrl,
gitlabApiPathPrefix,
assets
}
]]
// skipped steps
const verifyRelease = []
const fail = []
const success = []
const addChannel = []
module.exports = {
repositoryUrl: 'https://gitlab.com/yyynnn/semantic_release_example.git',
branches: ['master'],
verifyConditions,
analyzeCommits,
verifyRelease,
generateNotes,
prepare,
publish,
fail,
success,
addChannel
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment