I just replayed it and here is how I beat it:
1.5 line version:
I built clerics, warriors, dwarves, and dwarven towers for defense only. Only resurrected heroes later in the game when I had the cash.
Full version:
I built 2 warriors guilds and 2 clerics guilds, plus a marketplace right away. I researched the first 3 things in the marketplace, upgraded a warriors guild and a clerics guild to level 2, and researched their upgrades (in the level 2 guilds only).
I also flagged for exploration to each direction (NW, N, NE, E, SE, S, SW, W), but not too far away (warriors and clerics don't like to explore far). I think I used 300 gold in these to entice them. Any lair I uncovered immediately had a 200 gold attack flag placed on them. This was started early, but completed well after the first 10 days.
When the first 10 days were up, I got a bunch of gold from 'alliance kingom'. Got to love the English translations.... I invested that money into upgrading my palace to level 2, the marketplace to level 2, and a third warriors guild and clerics guild. I was using the first artifact you get every chance I could when a mass of undead would group up.
The money from the 20 days event was spent on a blacksmith upgraded to level 2, upgrading the palace to level 3, market to level 3 (fully researched), and plopping down 2 dwarven settlements. One upgraded to level 2 and researched everything (you'll need the repair building spell).
At this point, I was barely holding off the hordes, but doing okay. I had a few heroes die and I'd replace them by just buying new ones rather than ressurecting from the graveyard. 30+ days in, recruiting new ones becomes wasteful due to the large amount of bad guys and high level ones thrown in, so I started around then (maybe as late as day 40, can't remember) to place down dwarven towers in pairs around the areas that would have waves of enemies. For me, it was the NE, NW, SE, and E side of my town. This got REALLY pricey, but the influx of money coming in from events every 10 days, plus the crazy amount of money heroes were making, were paying for most of it (I didn't get my 8th dwarven tower down until day 65).
At some point, maybe around day 55, I started resurrecting heroes from the graveyard instead of hiring new ones. I'd hire the highest level one as long as there was room in that guild.
I tried building a trading post at one point, and it got out 3 or 4 caravans to my marketplace, but it was too much of a hassle to keep up.
I also tried building a temple to Agrelia (or whatever it's called), later in the game. Maybe around turn 50? It was a waste. Elementals come over and stomped it to the ground and I didn't want to pull heroes away from my town to guard it, so I let it burn. Save your money.
I did all this without building an inn to form parties (though it certainly is a viable strategy), and only built a few guardposts before realizing they were pretty worthless. When I'd build a dwarven tower, I'd immediately 'heal' it with the dwarven spell so as to have it up and shooting right away, rather than risk it being destroyed before being built (they do get expensive! Last one cost 17,000 gold!).