Skip to content

Commit bbb97e2

Browse files
committed
ci: use semantic-release
1 parent de9f566 commit bbb97e2

File tree

4 files changed

+11716
-8441
lines changed

4 files changed

+11716
-8441
lines changed

.circleci/config.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -177,27 +177,19 @@ jobs:
177177

178178
deploy-npm:
179179
<<: *defaults
180-
environment:
181-
NODE_OPTIONS: --max-old-space-size=4000
182180
steps:
183181
- *restore_git_cache
184-
- *restore_dist_cache
185182
- checkout
186-
- run: |
187-
echo export RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')" >> $BASH_ENV
188-
echo export NPM_TAG=latest >> $BASH_ENV
189-
if [ "$CIRCLE_BRANCH" == "master" ]
190-
then echo export NPM_TAG=stable >> $BASH_ENV
191-
fi
192-
if [[ "$CIRCLE_BRANCH" == hotfix/* ]] # double brackets are important for matching the wildcard
193-
then echo export NPM_TAG=hotfix >> $BASH_ENV
194-
fi
195-
- run: npm version --no-git-tag-version $RELEASE_VERSION
196-
- run: |
197-
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
198-
npm publish --tag $NPM_TAG
199-
- run: git tag $RELEASE_VERSION
200-
- run: git push $CIRCLE_REPOSITORY_URL $RELEASE_VERSION
183+
- *restore_npm_cache
184+
- *restore_dist_cache
185+
- run:
186+
name: adjust config for hotfix if necessary
187+
command: |
188+
# double brackets are important for matching the wildcard
189+
if [[ "$CIRCLE_BRANCH" == hotfix/* ]]; then
190+
sed -e "s|hotfix/REPLACE|${CIRCLE_BRANCH}|" --in-place release.config.js
191+
fi
192+
- run: npx semantic-release
201193

202194
deploy-gh-pages:
203195
<<: *defaults

0 commit comments

Comments
 (0)