--- a/Makefile.am
+++ b/Makefile.am
@@ -63,3 +63,6 @@
 dist_man1_MANS = man/upmpdcli.1
 
 EXTRA_DIST = systemd/upmpdcli.service
+dist-hook:
+	test -z "`git status -s | grep -v upmpdcli-$(VERSION)`"
+	git tag -f -a upmpdcli-v$(VERSION) -m 'version $(VERSION)'