Great job, wish I could get that kind of bank account. Seriously, yes, buildings do have an upkeep cost but it is worthwhile to upgrade if you can maximize farming, mining, or trade income and also to improve units that you are making by upgrading their defense or attack capability. Also of course, to make new units you may need a building and also for agents (religious, assassins, or spys) you may need some new buildings.

So, where you upgrade your buildings may depend on the enemy (to bolster your border), units you wish to make, and income you wish to maximize.