I am mainly asking this out of curiosity and lack of understanding, and I chose Rome in particular as it is a good model, but anyone with knowledge on how this was done in other areas please share as well.
An author writes a codex / scroll / etc. For example, Caesar wrote many works including his war commentaries. Once he finished this, how did he go about "releasing" his work? I am aware that in Medieval Europe, the Bible was frequently copied by monks, but how would newly "published" works get distributed or even known about?
Most Romans were not literate, so only the Upper Class would have been able to read, but where would they go to get books? How many books would the average elite Roman have in their own possession? The Great Library of Alexandria existed during Roman times. Was it common for cities to have large collections of written works in public libraries?
Thanks for any info or sources!
Rome was a good bit more literate than you imagine. We don't have reliable data on what proportion of the population could read, and it's certainly nowhere remotely near modern first-world levels, to be sure, but when we talk about literate people we're definitely not just talking about the elite. A look at graffiti from Pompeii should illustrate that nicely.
The basic publication procedure was to commission a scribe workshop to mass produce the text, then have it disseminated by book-sellers. The book trade was pretty much thriving. Cicero Letters to Quintus 3.5/6 and Letters to Atticus 12.6a.1 refer to publication on a scale that, for the time, we might as well call "industrial"; Pliny the Younger, Letters 11.11.2, describes his surprise at finding out that his books were on sale in Lyon. 1st century BCE/CE book prices ranged from 6 sestertii for a cheap edition (Martial 1.66; one or two days' labourer's wage) to 5 denarii for a deluxe copy (Martial 1.117; about five to seven days' wage). A price comparison with the modern era doesn't make much sense, but for some kind of reference, at present-day minimum wage rates in the USA those would come to a range of about 60 to 400 US dollars. Not cheap, but certainly not just for the elite either. To save costs, you could recycle papyrus: an author could have his book copied onto a palimpsest (Catullus 22), that is, a papyrus that had been used and then had the layer with the original text has been scraped off; or customers could pay for a copy made on the back of something else.
Libraries were fairly common. But they weren't so much like a modern library where you borrow books; they were more like a centre for scribes. People could commission a scribe to go to the library and make a new copy of a book for them, and this seems to have been a fairly economical thing to do. (Copyright was irrelevant in a society where reproducing books was fairly labour-intensive.) This papyrus manuscript is an example: it's a collection of four rolls that were used for farm and business records somewhere near Hermopolis, a bit under 200 km south of Cairo. To save the cost of buying new papyrus, the owner then commissioned four professional scribes to make a copy of Aristotle's Constitution of the Athenians on the back. The copying was probably done at Alexandria. The economics of the situation, where the owner was willing to hire professional scribes, but not to provide them with clean papyrus, shows that scribes weren't extravagantly expensive.