forked from ethereum/ethereum-react-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·33 lines (23 loc) · 845 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
### 1. Github Pages
# Git config
git config --global user.email "[email protected]" &&
git config --global user.name "Mist-bot"
# Commits to /docs (github pages)
export FILES_CHANGED=`git status ./docs --untracked-files=no --porcelain | wc -l`
if [[ $FILES_CHANGED -gt 0 ]]; then
git add docs;
git commit -am 'Updating github pages [ci skip]';
# will be git-pushed within `standard-version` command.
fi
### 2. NPM publishing
# NPM config
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
# Bumps package.json, commits and publishes to npm
yarn run standard-version --message='chore(release): %s [ci skip]'
# Pushes changes back to the repository
git push --follow-tags origin $BRANCH
# Publishes npm module. Ensures publishing only from master branch
if [[ $BRANCH == 'master' ]]; then
npm publish
fi;