-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Automate release process (#372)
* Install and configure semantic-release * Publish from Travis CI * Try to fix docz build error on Travis * Speed up Travis CI with cache * Install and configure commitizen * Only deploy on master * Publish on master, next, and beta branches * Publish on all branches * Fix prereleaes script * fix: fix husky config tech/semantic-release tech/semantic-release tech/semantic-release tech/semantic-release * chore: upgrade @sumup/foundry tech/semantic-release tech/semantic-release tech/semantic-release * fix(configs): add proper scope names * style(configs): reset release number * fix(configs): remove obsolete dependency * style: fix eslint errors * chore(deps): upgrade to Foundry 1.4.1 * chore(deps): fix yarn.lock file
- Loading branch information
1 parent
4fc6e6e
commit f0dc889
Showing
15 changed files
with
375 additions
and
80 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,40 @@ | ||
module.exports = { | ||
types: [ | ||
{ value: 'feat', name: 'feat: A new feature' }, | ||
{ value: 'fix', name: 'fix: A bug fix' }, | ||
{ value: 'docs', name: 'docs: Documentation only changes' }, | ||
{ | ||
value: 'style', | ||
name: | ||
'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)' | ||
}, | ||
{ | ||
value: 'refactor', | ||
name: | ||
'refactor: A code change that neither fixes a bug nor adds a feature' | ||
}, | ||
{ | ||
value: 'perf', | ||
name: 'perf: A code change that improves performance' | ||
}, | ||
{ value: 'test', name: 'test: Adding missing tests' }, | ||
{ | ||
value: 'chore', | ||
name: | ||
'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation' | ||
}, | ||
{ value: 'revert', name: 'revert: Revert to a commit' }, | ||
{ value: 'WIP', name: 'WIP: Work in progress' } | ||
], | ||
|
||
scopes: [ | ||
{ name: 'components' }, | ||
{ name: 'utils' }, | ||
{ name: 'docs' }, | ||
{ name: 'theme' }, | ||
{ name: 'configs' } | ||
], | ||
|
||
allowCustomScopes: true, | ||
allowBreakingChanges: ['feat', 'fix'] | ||
}; |
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 |
---|---|---|
@@ -1 +1,10 @@ | ||
module.exports = require('@sumup/foundry/husky').base; | ||
const { merge } = require('lodash/fp'); | ||
const { base: baseConfig } = require('@sumup/foundry/husky'); | ||
|
||
const customConfig = { | ||
hooks: { | ||
'commit-msg': 'cz-customizable-ghooks ${HUSKY_GIT_PARAMS}' | ||
} | ||
}; | ||
|
||
module.exports = merge(baseConfig, customConfig); |
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 @@ | ||
module.exports = require('@sumup/foundry/semantic-release').modules; |
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 |
---|---|---|
@@ -1,21 +1,48 @@ | ||
language: node_js | ||
sudo: required | ||
|
||
dist: trusty | ||
|
||
language: node_js | ||
|
||
node_js: '10.15.0' | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- 'node_modules' | ||
|
||
before_install: | ||
- npm install -g yarn | ||
install: yarn install --frozen-lockfile | ||
script: yarn check:security && yarn check:licenses && yarn test:ci | ||
|
||
deploy: | ||
provider: pages | ||
skip_cleanup: true | ||
github_token: $GITHUB_TOKEN | ||
on: | ||
branch: master | ||
local-dir: dist | ||
target_branch: gh-pages # default | ||
before_deploy: | ||
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
- rm -rf ./dist && mkdir dist && yarn run docz:build && yarn build && cp ./src/CNAME ./dist/CNAME | ||
after_success: yarn coverage:upload -t ${CODECOV_TOKEN} | ||
jobs: | ||
include: | ||
# Run tests in parallel | ||
- stage: test | ||
script: yarn check:security && yarn check:licenses | ||
- script: yarn test:lint-js | ||
- script: yarn test:unit --runInBand | ||
# Upload coverage reports to Codecov | ||
after_success: yarn coverage:upload -t ${CODECOV_TOKEN} | ||
- stage: publish | ||
script: skip | ||
# Publish package to NPM | ||
deploy: | ||
provider: script | ||
skip_cleanup: true | ||
on: | ||
all_branches: true | ||
script: yarn release | ||
# Increase number of watchers | ||
- script: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
if: branch = master | ||
# Deploy docz and Storybook to GitHub Pages | ||
before_deploy: yarn predeploy | ||
deploy: | ||
provider: pages | ||
skip_cleanup: true | ||
github_token: $GITHUB_TOKEN | ||
on: | ||
branch: master | ||
local-dir: dist | ||
target_branch: gh-pages |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.