chore: release script
This commit is contained in:
@@ -18,11 +18,13 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vuepress dev example",
|
||||
"build": "vuepress build example"
|
||||
"build": "vuepress build example",
|
||||
"release": "sh scripts/release.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vuepress": "^1.2.0",
|
||||
"vuepress-theme-resume": "^1.0.0"
|
||||
"vuepress-theme-resume": "^1.0.0",
|
||||
"standard-version": "^4.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0",
|
||||
|
||||
22
scripts/release.sh
Normal file
22
scripts/release.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
version=$(node -p "const { version } = require('./package.json'); version")
|
||||
|
||||
git checkout master
|
||||
|
||||
# build
|
||||
yarn build
|
||||
|
||||
# commit
|
||||
git add -A
|
||||
standard-version --commit-all --release-as $version
|
||||
|
||||
# gh-pages
|
||||
git checkout gh-pages
|
||||
git merge master
|
||||
git checkout master
|
||||
|
||||
# push
|
||||
git push --tags origin
|
||||
git push --all origin
|
||||
|
||||
# publish
|
||||
npm publish --registry=https://registry.npmjs.org
|
||||
Reference in New Issue
Block a user