add publish function to Makefile