diff --git a/Makefile b/Makefile index eaf73d6..973bda4 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,13 @@ ci-lint: node_modules node_modules: yarn install --non-interactive --frozen-lockfile --ignore-scripts +.PHONY: publish +publish: | distclean node_modules + @git diff-index --quiet HEAD || (echo "Uncommitted changes, please commit first" && exit 1) + @git fetch origin && git diff origin/master --quiet || (echo "Changes not pushed to origin, please push first" && exit 1) + @yarn config set version-tag-prefix "" && yarn config set version-git-message "Version %s" + @yarn publish && git push && git push --tags + .PHONY: clean clean: rm -rf lib/ coverage/