The First Step

The First Step is a Minutemen main quest and achievement/trophy in Fallout 4.

Detailed walkthrough
This quest begins right after When Freedom Calls, by escorting the settler group alongside Preston Garvey. Arriving in Sanctuary, and interacting with Preston has him exchange thanks, and then ask the Sole Survivor to help him rebuild the Minutemen. Agreeing to this begins the quest.

In order to bring the Minutemen back, they will need more men. Preston brings word of a settlement under attack by raiders and asks you to take care of it. The settlement will generally be chosen from a limited set of nearby settlements unless they all had been unlocked beforehand. Speaking to the settlers there begins the next stage of the quest.

Here, the player has to clear out a location of the raiders that dwell there. Also randomized, the quest will not update until the raiders inside the location are killed; any raider enemies encountered outside the location don't count towards the quest, and can be ignored.

Return to the settlement and receive the reward and allegiance from the settlers, then return to Preston. He will congratulate you, and then give you a flare gun, along with some flares, that will come in handy once the Minutemen have more allied settlements. He tells you a story, then formally acknowledges you as the new General, leader of the Minutemen. The quest finishes here.

Companion affinity
In the dialogue with Preston, companions have reactions to joining the Minutemen:
 * Codsworth, Danse, Deacon, Hancock, MacCready, Nick, and Piper like agreeing to join the Minutemen.
 * X6-88 and Cait dislike it.
 * Codsworth, Curie, Deacon, and Strong dislike refusing to join.
 * Since Preston is always at Sanctuary until the dialogue is completed (at which point he becomes a companion and can be relocated), all other available companions can be dismissed to Sanctuary to witness the dialogue, allowing multiple companions to have their affinities raised or lowered at once.