Skip to content

Commit

Permalink
Merge pull request #550 from wheresrhys/release-tag
Browse files Browse the repository at this point in the history
correctly use npm prerelease tag
  • Loading branch information
wheresrhys committed May 10, 2020
2 parents 3f8bbc8 + 4b3e9e9 commit 4f1ef07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 1 addition & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ jobs:
- restore_cache:
key: npm-cache-{{ checksum "package-lock.json" }}
- run: 'echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ${HOME}/.npmrc'
- run: npm version --no-git-tag-version ${CIRCLE_TAG}
- run: |
if [ $CIRCLE_TAG ?? '-'];
then npm publish --access public --tag beta;
else npm publish --access public;
fi
- run: make publish


workflows:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ build: transpile

docs:
cd docs; jekyll serve build --watch

NPM_PUBLISH_TAG := $(shell [[ "$(CIRCLE_TAG)" =~ -[a-z-]+ ]] && echo "pre-release" || echo "latest")
publish:
npm version --no-git-tag-version $(CIRCLE_TAG)
npm publish --access public --tag $(NPM_PUBLISH_TAG)

0 comments on commit 4f1ef07

Please sign in to comment.