Stick a strip of double-sided butyl tape along the rake edge of the roofing panels, running all the way from ridge to eaves.
Place a piece of gable trim over the lower corner of the rake, overlapping the butyl tape. Screw it in place with two wood screws, one on top and one on the side of the trim, every 2 feet along its length.
Place the next piece of trim over the rake just above the first one, overlapping it by 4 inches. Secure it to the roof just as before and continue laying trim until you reach the ridge.