We present a suite of cosmological radiation-hydrodynamical simulations of the assembly of galaxies driving the reionization of the intergalactic medium (IGM) at z 6. The simulations account for the hydrodynamical feedback from photoionization heating and the explosion of massive stars as supernovae (SNe). Our reference simulation, which was carried out in a box of size 25 h −1 comoving Mpc using 2 × 512 3 particles, produces a reasonable reionization history and matches the observed UV luminosity function of galaxies. Simulations with different box sizes and resolutions are used to investigate numerical convergence, and simulations in which either SNe or photoionization heating or both are turned off, are used to investigate the role of feedback from star formation. Ionizing radiation is treated using accurate radiative transfer at the high spatially adaptive resolution at which the hydrodynamics is carried out. SN feedback strongly reduces the star formation rates (SFRs) over nearly the full mass range of simulated galaxies and is required to yield SFRs in agreement with observations. Photoheating helps to suppress star formation in low-mass galaxies, but its impact on the cosmic SFR is small. Because the effect of photoheating is masked by the strong SN feedback, it does not imprint a signature on the UV galaxy luminosity function, although we note that our resolution is insufficient to model star-forming minihaloes cooling through molecular hydrogen transitions. Photoheating does provide a strong positive feedback on reionization because it smooths density fluctuations in the IGM, which lowers the IGM recombination rate substantially. Our simulations demonstrate a tight non-linear coupling of galaxy formation and reionization, motivating the need for the accurate and simultaneous inclusion of photoheating and SN feedback in models of the early Universe.