Edit = prepare a manuscript for publication or presentation by correcting or revising or refining: ‘The text should be properly edited before publication.’ ‘She edited a book on lexical semantics.’
Publish = put into print (a book, magazine, newspaper, etc.) for sale to the public: ‘The book was first published in 1987.’ ‘She published 25 books during her career.’