Interview Prep/Git & GitHub/Branching Strategies and Releases

You want a published release and deployment to start whenever someone pushes a version tag.

BeginnerScenarioBranching Strategies and Releases
Answer

Situation read → The tag becomes the release trigger.

What I'd do →

  1. Workflow trigger on tags:
on:
  push:
    tags: ['v*.*.*']
  1. Build the artifact, tag the image with the tag name and commit SHA.
  2. Create the GitHub release: gh release create "$GITHUB_REF_NAME" --generate-notes.
  3. Protect v* tags so only maintainers can create them.

Why → The pipeline is reproducible from a tag alone, and humans only decide when to tag.

Interview tip → Mention that tag creation permission is effectively release permission.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases