This is probably the most likely scenario that I would encounter where I live. Third floor apartment so windows aren't much of a concern, and the door seems like the only valid entry point. It's pretty heavy with a deadbolt and chain lock, so I think even a drunky would have a rather difficult time gaining entry.

After thoroughly crapping my pants, I would immediately grab the glock and phone and take cover behind my bed or couch. A verbal warning will have been given already. Dial 911 with a concise description of the situation and my location. Let the dispatchers know I am armed and to have officers announce themselves before entry (I'm sure this is the norm anyway).

If entry by assailant was made, shots would be fired immediately.

To clarify: my steps would be grab gun, verbal warning, dial 911 - in that order