There is a type of Diode called a Schottky diode, which is basically a metal-semiconductor junction, so it begs the question, how do you form a metal contact with any semiconductor device, not just a diodes.

The answer lies in why a metal-semi junction exhibits diode behaviour in some circumstances. When you have a discrete junction between the metal and semiconductor regions, in simplistic terms it causes bending of the band structure. The energy bands in the semiconductor curve to match those of the metal at the junction which forms an inbuilt energy barrier - a diode.

However for a diode to be formed, a discrete junction is needed, and this is where the key difference lies. When you want to make a connection between metal and the semiconductor for connecting it to the external world (or connecting other devices together), you don't make a discrete junction, you form a Ohmic contact. The difference here is that you diffuse the metal ions into the semiconductor which essentially blurs the boundary between the two - you now have a region where there is a gradual change between the two materials.

By diffusing the metal into the semiconductor, the junction breaks down as the current can bypass the barrier thanks to additional metal ions in the structure. The region will inherently be more resistive than just the bulk metal as it transitions into the semiconductor, but you no longer have a diode.

Once you have an Ohmic connection with the semiconductor, you can simply deposit a metal bond pad onto the connection point, and then wire bond those to the diodes metal pads (SMD) or legs (through-hole).