From 700a15be98850a99257d37e6f2db11bb4ca4e52e Mon Sep 17 00:00:00 2001 From: Pavle Portic Date: Sun, 30 Oct 2022 12:08:51 +0100 Subject: [PATCH] Add publish target to makefile --- makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/makefile b/makefile index 8e34a53..7ce855e 100644 --- a/makefile +++ b/makefile @@ -29,3 +29,11 @@ clean: rm -rf $(CURDIR)/build rm -rf $(CURDIR)/dist rm -rf $(CURDIR)/$(NAME).egg-info + +publish: + @git checkout $(shell git tag | sort -V | tail -n1) >/dev/null 2>&1 + @$(MAKE) clean > /dev/null + @$(MAKE) build > /dev/null + @twine upload dist/* + @$(MAKE) clean > /dev/null + @git switch main >/dev/null 2>&1