diff --git a/scripts/postversion/release-storybook.js b/scripts/postversion/release-storybook.js index ea7a40f702b..36379433f98 100644 --- a/scripts/postversion/release-storybook.js +++ b/scripts/postversion/release-storybook.js @@ -13,7 +13,7 @@ module.exports = new Promise((resolve) => { } highlightLog('Deploy Storybook'); - shell.exec('node_modules/.bin/storybook-to-ghpages --existing-output-dir .out'); + shell.exec('node_modules/.bin/storybook-to-ghpages --ci --existing-output-dir .out'); highlightLog('Storybooks deployed successfully'); resolve(); diff --git a/scripts/release/release.sh b/scripts/release/release.sh new file mode 100755 index 00000000000..7a7b8fb7774 --- /dev/null +++ b/scripts/release/release.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# make sure we are on the master branch +git checkout master + +# install dependencies +yarn install --mutex network + +# run tests +yarn test + +# trigger lerna release and create new storybook +./node_modules/.bin/lerna version \ + --conventional-commits \ + --exact \ + --github-release \ + --no-push \ + --yes + +# get the new version number +RELEASE_VERSION=$(node -p "require('./lerna.json').version") +# get the new version number +git checkout -b releases/${RELEASE_VERSION} +git push --set-upstream origin releases/${RELEASE_VERSION} + +# build the project with the new version after lerna version +yarn build + +# if we came to that point we are ready for publish + +# create npmrc with auth +bash ${WORKSPACE}/scripts/ci/setup-npm.sh + +# now start publishing each package +cd ${WORKSPACE}/build/node_modules/charts && npm publish --access public +cd ${WORKSPACE}/build/node_modules/fiori3 && npm publish --access public +cd ${WORKSPACE}/build/node_modules/styles && npm publish --access public +cd ${WORKSPACE}/build/node_modules/utils && npm publish --access public + +# all packages are now released, clear npm-session +rm ~/.npmrc