We have grown and characterized 30 nm thick YBa$_2$Cu$_3$O$_{7-delta}$ (YBCO) films, deposited by pulsed laser deposition on both MgO (110) and SrTiO$_3$ (001) substrates, which induce opposite strain to the superconducting layer. By carefully tuning the in-situ post-annealing oxygen pressure, we achieved, in a reproducible way, films at different oxygen doping, spanning from the slightly overdoped down to the strongly underdoped region of the phase diagram. The transport properties of the films, investigated through resistance versus temperature measurements, are in perfect qualitative agreement with single crystals. Starting from these films, we have also successfully fabricated nanowires with widths down to 65 nm, at different oxygen doping. The nanostructures exhibit characteristic temperatures (as the critical temperature $T_{mathrm{c}}$ and the pseudogap temperature $T^*$) similar to those of the as-grown films and carry critical current densities $J_{mathrm{c}}$ close to the critical depairing value, limited by vortex entry. This implies that the superconducting and the normal state properties of underdoped YBCO are preserved in our films, and they can be studied as a function of the dimensionality of the system, down to the nanoscale.