Skip to content
Latchkey

How to Create a GitHub Release With a Changelog in GitHub Actions

On a tag push, create a Release and let GitHub generate the changelog from merged PRs, attaching your built assets.

Use softprops/action-gh-release (or gh release create) with generate_release_notes: true to build the changelog automatically. Grant contents: write and trigger on tag pushes.

Steps

  • Trigger on push with a tags: ["v*"] filter.
  • Grant permissions: contents: write.
  • Build the release artifacts.
  • Create the release with generate_release_notes: true and files:.

Workflow

.github/workflows/release.yml
on:
  push:
    tags: ['v*']
permissions:
  contents: write
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build && npm pack
      - uses: softprops/action-gh-release@v2
        with:
          generate_release_notes: true
          files: '*.tgz'

Common pitfalls

  • Without contents: write the release API call returns 403 "Resource not accessible by integration".
  • Auto-generated notes need a previous tag to diff against; the first release lists everything.
  • A shallow checkout can miss tags; set fetch-depth: 0 if your notes logic walks history.

Related guides

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