Skip to content
Latchkey

How to Trigger a Workflow on a Milestone Event in GitHub Actions

The milestone event fires on milestone activity such as created, closed, opened, edited, and deleted.

Add on.milestone with the types: you care about, then read github.event.milestone to drive changelog or release-planning automation.

Steps

  • Add milestone: under on with types such as [closed].
  • Read github.event.milestone.title and due_on.
  • Kick off changelog or release-note generation.

Workflow

.github/workflows/milestone.yml
on:
  milestone:
    types: [closed]
jobs:
  changelog:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Milestone ${{ github.event.milestone.title }} closed"

Gotchas

  • Milestone events run only from the default branch, like most non-push events.
  • Available types are created, closed, opened, edited, and deleted.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →