I agree with the others who say to get a premade extension cord.
Standard Romex is not suitable for outdoor use (it's not rated for damp locations, much less wet ones), nor for places where it's subject to physical damage, nor for use where it gets bent and unbent repeatedly. A 12 gauge extension cord and a 15-30A adapter will probably cost no more than the Romex and the plug and socket to build one yourself; in either case, you're paying mostly for the copper, and it's the same amount in either case.