Apply butyl tape or the manufacturer-recommended sealant on the upper surface of the metal roofing where the flashing will be joined with the roofing. Lay the gable flashing on the tape and drill holes over the butyl tape seam/gable trim joint every 24 inches. Drive the first fastener on the upwind side of the flashing and then work downwind.
Mitre the cut at the roof peak with tin snips. Use a T-square and level to make sure the initial cut is vertical and extends 1 inch into the other side. This type of cutting will assure a good seal by making a tab that will go underneath the overlapping gable trim from the other side of the roof peak.
Drill holes in the front facing of the gable trim where it covers the fascia and every 24 inches. Install fasteners in these holes, making sure that the rubber washer is not flattened too much.
Install flashing where siding materials change from the triangular portion of the gable to the walls to protect these transition points. Wrapping the construction in this area with a material like Tyvek will provide an extra layer of protection from moisture penetration.