What happens next?

How to build a gable roof
Nail top plates to all the outside walls.
The top plates should consist of 2 boards of sufficient width to cover the tops of the walls.
Measure and cut ceiling joists from 2-by-4 lumber.
You will attached these to each pair of rafters so they resist the outward pressure of the rafters on the walls. Install the ceiling joists onto the top plates so they span the structure from one long wall to the other.