You can do both. If you have intellectual property that you wish to protect, patent it first before you disclose the information in a public publication or a presentation. Write the manuscript while the lawyers prepare the patent document. Once you get the okay from the lawyers, the submit the manuscript for publication.
One comment on about "publish or perish." In today's academic environment, it is no longer enough to publish or perish, but you also have to be found (i.e. have "impact," as defined by the number of citations a paper receives).