Skip to content
Latchkey

How to Create a GitHub Release on Tag Push in GitHub Actions

A workflow filtered on tag pushes can create the matching GitHub Release in one step with softprops/action-gh-release.

Filter on.push.tags, grant contents: write, and run softprops/action-gh-release. It creates a Release for the pushed tag and can generate notes for you.

Steps

  • Trigger on push.tags matching your version glob.
  • Grant contents: write so the job can create the release.
  • Run softprops/action-gh-release with generate_release_notes: true.

Workflow

.github/workflows/release.yml
on:
  push:
    tags:
      - 'v*.*.*'
permissions:
  contents: write
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: softprops/action-gh-release@v2
        with:
          generate_release_notes: true

Gotchas

  • Without contents: write the release create call fails with a 403.
  • The action uses github.ref_name as the tag by default; set tag_name to override it.

Related guides

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