Courseiva
Design and implement build and release pipelineseasyMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Your company uses GitHub Actions for CI/CD. The development team wants to automatically create a new GitHub release with release notes whenever a pull request is merged to the main branch. The release notes should include a list of all merged pull requests since the last release. You need to implement this automation. What should you do?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add a workflow triggered on push to main that uses the 'softprops/action-gh-release' action to create a release with auto-generated release notes.

The 'softprops/action-gh-release' action can create a release and, when configured with `generate_release_notes: true`, generates release notes from merged PRs. Option B is incorrect because requiring a release note file via branch protection does not create a GitHub release. Option C is incorrect because GitHub does not automatically create releases from tags; a release must be created explicitly. Option D is incorrect because `gh release create` alone does not automatically generate release notes from merged PRs; it requires a manually constructed changelog.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add a workflow triggered on push to main that uses the 'softprops/action-gh-release' action to create a release with auto-generated release notes.

    Why this is correct

    This is correct because the workflow, triggered on every push to main, uses the 'softprops/action-gh-release' action with 'generate_release_notes: true' (or the action's default behavior) to automatically create a GitHub Release. The action compares against the previous tag and auto-assembles release notes from merged pull requests, providing a fully automated, hands-off release process.

  • Configure a branch protection rule to require a release note file in each pull request.

    Why it's wrong here

    This is incorrect because a branch protection rule that requires a release note file only enforces that each pull request includes some file (e.g., 'release-notes.md')—it does not create a release or generate notes from merged PRs. It adds an administrative gate but lacks any automation to publish a release or aggregate notes, so it fails the requirement to automatically create releases with auto-generated release notes.

  • Use a workflow that runs on pull request merge and creates a Git tag, then rely on GitHub to create a release from the tag.

    Why it's wrong here

    This is incorrect because creating a Git tag via a workflow does not automatically create a GitHub Release; releasing from a tag is a separate manual step or requires an additional action. Even if a release were created, GitHub does not auto-generate release notes from merged pull requests unless you explicitly invoke the release-notes API or use a dedicated action like 'softprops/action-gh-release'. Relying on a tag alone leaves both release creation and note generation unautomated.

  • Add a step to the existing CI workflow that runs 'gh release create' with a changelog.

    Why it's wrong here

    The gh CLI requires authentication setup and does not auto-generate notes from merged PRs without additional scripting.

About these practice questions

One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.