SuperAPI AI Directory

automate-commit-based-gh-release-changelog

Deployment & operations

View repository

Updated 10-16 22:15

About this skill

Automate Commit-Based GitHub Release Changelog

Uses changelogithub to read Conventional Commits between tags and create (or update) a GitHub release with a formatted changelog.

Workflow setup

Trigger and permissions

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: write   # required — default contents:read cannot create releases

Changelog step

Run changelogithub as the last step — after npm publish (if any) — so a failed publish doesn't create a dangling GitHub release:

- uses: actions/checkout@v6
  with:
    fetch-depth: 0  # full tag history required; shallow clone produces empty changelog

- uses: pnpm/action-setup@v6

- name: Generate changelog
  run: pnpm dlx changelogithub
  env:
    GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Conventional Commits

changelogithub groups entries by type and surfaces breaking changes at the top:

Commit prefix Changelog section
feat: Features
fix: Bug Fixes
chore: Chores
feat!: / chore!: Breaking Changes (top)

Commits that don't follow the convention are omitted from the changelog.

Preview before pushing a tag

pnpm dlx changelogithub --dry

Reference

  • For a complete end-to-end workflow combining npm publish + changelog generation, see automate-npm-release/EXAMPLE_WORKFLOW.yml if that skill is installed locally.