Resistance spot welding of magnesium alloys