Fix build and publish procedure