CI build script modified for publishing