toucanbuzz
No rule is inviolate
I'm looking for inspiration or complications. There are plenty of pre-written adventures which deal with PCs defending a city during a siege, but there's seem to be none about they participating in the attack.
I defer to 3rd Edition's Red Hand of Doom. While it involved city defense, it directed the PCs to handle crucial moments as, effectively, the elite Seal Team 6 of the land. Based on their prior adventures, the difficulty of each scenario could be affected, including a dragon setting fire to buildings, hill giants pelting the city from afar with boulders, and an elite attack on a key structure. The module had a point system for how the battle would turn out, varying by what the PCs did both before and during the battle.
In a city raid, same thing. Beforehand, can they take any actions to infiltrate the city, discover and sabotage a sally door, recruit allies, prevent enemy allies from reinforcing the city? During the battle, the aforementioned "commando" style is best. It could be hold the sally door until we can reinforce, or penetrate the sewers and open a way in, or we've found their wizard's communication center, heavily guarded and warded, need the PCs to take it out, and so on, with perhaps a short rest in between "raids." Each one of these needs a failure option (e.g. you have to hold for 10 rounds to get troops through the sally door).
In any case, you should have a scenario in mind on where to go if the attack fails.