title: Semantic Awesomeness style: ./semantic-awesomeness.css controls: false
-- bg bg-intro
Merge to master and have a release
by [Vladimir Starkov](https://iamstarkov.com)
frontend engineer at [Nordnet Bank AB](https://www.nordnet.se/)
-- bg bg-headaches
-- bg bg-mynameis
-- bg bg-problem
-- bg bg-semver
--
- http://semver.org/
- MAJOR . MINOR . PATCH
- BREAKING . FEATURE . FIX
or
- MAJOR: intended
- MINOR: that was unexpected
- FIX: wow, who could thought of it
-- bg bg-history
--
- 17 September, 2011: SemVer 1.0 was just born
- 17 March, 2012: conventional changelog by angular.js
- 18 June , 2013: SemVer 2.0 release
- Stephan Bönnemann is working on Hoodie
- 1 August, 2014: grunt-release-hoodie
- 3 September 2014: grunt-semantic-release
- 13 June 2015: semantic-release
-- bg bg-semantic-release
--
- https://github.com/semantic-release/semantic-release
- by Stephan Bönnemann @boennemann (Hoodie, semantic-release, greenkeer.io)
- certain commit message format
- Changelog is derived from commit messages
- next version is derived from commit messages as well
--
type(scope?): short message
long description
BREAKING CHANGES or github/jira issues mentions
-- bg bg-practicalities
--
- Continuous Integration in place
- release-bot credentials:
- SCM access
- NPM registry
--
- semantic-release for Travis + GitHub
- corp-semantic-release for everything else
--
commitizen + cz-conventional-changelog config
// ./package.json
"scripts": {
"commit": "git-cz",
// ...
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
--
--
husky + @commitlint/{cli,config-angular}
// ./package.json
"scripts": {
"commitmsg": "commitlint -e $GIT_PARAMS",
}
// commitlint.config.js
module.exports = { extends: [ '@commitlint/config-angular'] }
-- images
--
- run semantic-release only in master
- ignore commit message [ci-skip]
- ignore git tags
- ignore the release-bot
--
npm install --save-dev semantic-release
// ./.travis.yml
git config user.email "release-bot@localhost"
git config user.name "release-bot"
npm run build
npm run semantic-release
// ./package.json
"scripts": {
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
}
-- images
--
npm install --save-dev corp-semantic-release conventional-changelog-angular-bitbucket
// ./.travis.yml
git config user.email "release-bot@localhost"
git config user.name "release-bot"
git checkout master
npm run build
npm run semantic-release
npm publish
// ./package.json
"scripts": {
"semantic-release": "corp-semantic-release --changelogpreset angular-bitbucket -v",
}
-- images
-- bg bg-summary
-- bg bg-outro
In painless releases we trust
Sincerely yours [Vladimir Starkov](https://iamstarkov.com) _@iamstarkov on [github](https://github.com/iamstarkov) and [twitter](https://twitter.com/iamstarkov)_