Knowledge of the spin-wave dispersion relation is a prerequisite for the explanation of many magnonic phenomena as well as for the practical design of magnonic devices. Spin-wave dispersion measurement by established optical techniques such as Brillouin light scattering or the magneto-optical Kerr effect at ultralow temperatures is often forbiddingly complicated. By contrast, microwave spectroscopy can be used at all temperatures but it usually lacks spatial and wave-number resolution. Here we develop a variable-gap-propagating-spin-wave-spectroscopy (VGPSWS) method for the deduction of the dispersion relation of spin waves in a wide frequency and wave-number range. The method is based on the phase-resolved analysis of the spin-wave transmission between two antennas with variable spacing, in conjunction with theoretical data treatment. We validate the method for in-plane magnetized $\mathrm{Co}$-$\mathrm{Fe}$-$\mathrm{B}$ and yttrium iron garnet thin films in $\mathbf{k}\ensuremath{\perp}\mathbf{B}$ and $\mathbf{k}\ensuremath{\parallel}\mathbf{B}$ geometries by deducing the full set of material and spin-wave parameters, including spin-wave dispersion, hybridization of the fundamental mode with the higher-order perpendicular standing spin-wave modes, and surface spin pinning. The compatibility of microwaves with low temperatures makes this approach attractive for cryogenic magnonics at the nanoscale.