We present a dynamical model for gas transport, star formation, and winds in the nuclear regions of galaxies, focusing on the Milky Way's Central Molecular Zone (CMZ). In our model angular momentum and mass are transported by a combination of gravitational and bar-driven acoustic instabilities. In gravitationally-unstable regions the gas can form stars, and the resulting feedback drives both turbulence and a wind that ejects mass from the CMZ. We show that the CMZ is in a quasi-steady state where mass deposited at large radii by the bar is transported inward to a star-forming, ring-shaped region at ∼ 100 pc from the Galactic Centre, where the shear reaches a minimum. This ring undergoes episodic starbursts, with bursts lasting ∼ 5 − 10 Myr occurring at ∼ 20 − 40 Myr intervals. During quiescence the gas in the ring is not fully cleared, but is driven out of a self-gravitating state by the momentum injected by expanding supernova remnants. Starbursts also drive a wind off the star-forming ring, with a time-averaged mass flux comparable to the star formation rate. We show that our model agrees well with the observed properties of the CMZ, and places it near a star formation minimum within the evolutionary cycle. We argue that such cycles of bursty star formation and winds should be ubiquitous in the nuclei of barred spiral galaxies, and show that the resulting distribution of galactic nuclei on the Kennicutt-Schmidt relation is in good agreement with that observed in nearby galaxies.