There are two three separate issues here:
Extension Cord
An extension cord is not supposed to be used for permanent wiring. You really should use a permanent wiring method - either cable designed for outdoor use or wires in conduit. Normally this involves buried cable or conduit, with specific minimum depth required depending on the type of cable or conduit.
Conduit may cost more initially (materials cost for conduit + wires is generally more than underground cable, but trenching cost/effort is lower for conduit) but has the advantage that you can start with 10 AWG and upgrade later if you need more power, and/or start with a single hot (120V, see below) and upgrade later to two hots (240V).
Breaker Size/Subpanel
If you have a 30A breaker, normally all wire in the circuit needs to be 10 AWG or larger. GFCI (which will be needed anyway) does not help protect against high current, only from unbalanced current.
The preferred solution, unless you only need one circuit (in which case you can switch to a smaller breaker) is a subpanel, with 30A coming in (or more if you install larger wire and breaker) and as many 15A or 20A circuits as you need to power lights, receptacles, etc.
There are a bunch of other things you will need:
- GFCI - This can be in receptacles or as part of the breakers in the subpanel
- Ground rods connected to the ground of the subpanel
- Ground and neutral separate in the feed cable and in the subpanel
- Shutoff switch - the easiest way to do this is a subpanel that has a main breaker. That breaker can be much larger than the feeder capacity - even 100A or more - as the breaker in the main panel will protect the wire (e.g., 30A for 10 AWG).
120V vs. 240V
I missed this until I read Harper's answer. You are referring to a 30A 120V circuit - i.e., a single pole. If you can manage it (two breaker spaces next to each other instead of just one) then a 2-pole breaker will serve you much better. Instead of 2 wires (hot/neutral) + ground, you run 3 wires (hot/hot/neutral) + ground. Depending on a bunch of factors, this will cost you a little more, but definitely not twice as much, and provide you with both twice as much total power and the ability to run 240V devices if you ever need to do so.